Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
l-lin committed Apr 4, 2014
1 parent 492cfe7 commit e2ce5c1
Show file tree
Hide file tree
Showing 40 changed files with 27,751 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "vendor"
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
bin
.tmp
*.iml
35 changes: 35 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"globals": {
"angular": false,
"after": false,
"afterEach": false,
"angular": false,
"before": false,
"beforeEach": false,
"browser": false,
"describe": false,
"expect": false,
"inject": false,
"it": false,
"spyOn": false
}
}
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- '0.8'
- '0.10'
before_script:
- 'npm install -g bower grunt-cli'
- 'bower install'
223 changes: 223 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
// Generated on 2013-11-23 using generator-angular 0.6.0-rc.1
'use strict';

// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'

module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
var path = require('path');

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
yeoman: {
// configurable paths
src: 'src',
dist: 'dist',
build: '.tmp',
banner: '/*!\n' +
' * <%= pkg.name %> - v<%= pkg.version %>\n' +
' * https://github.com/<%= pkg.author %>/<%= pkg.name %>\n' +
' */\n'
},
/** ------------- WATCH FILES FOR DEBUG PURPOSES ------------- */
watch: {
livereload: {
options: {
livereload: '<%= express.options.livereload %>'
},
files: [
'<%= yeoman.src %>/**/*.html',
'<%= yeoman.src %>/styles/{,*/}*.css',
'<%= yeoman.src %>/{,*/}*.js',
'<%= yeoman.src %>/{,*/}*.css',
'<%= yeoman.src %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
]
},
test: {
options: {
livereload: {
port: 35728
}
},
files: [
'<%= yeoman.src %>/{,*/}*.html',
'{<%= yeoman.build %>,<%= yeoman.src %>}/app/{,*/}*.js'
],
tasks: ['test']
}
},
express: {
options: {
port: 9000,
hostname: '127.0.0.1',
livereload: 35729
},
livereload: {
options: {
open: true,
bases: path.resolve(__dirname)
}
},
test: {
options: {
port: 9001,
bases: [
'test',
'<%= yeoman.src %>'
]
}
}
},
/** ------------- CLEAN TMP FOLDERS ------------- */
clean: {
dist: {
files: [{
dot: true,
src: [
'<%= yeoman.build %>',
'<%= yeoman.dist %>/*',
'!<%= yeoman.dist %>/.git*'
]
}]
},
server: '<%= yeoman.build %>'
},
/** ------------- FORMAT JS CODES ------------- */
jsbeautifier: {
files: [
'<%= yeoman.src %>/{,*/}*.js',
'test/{,*/}*.js',
'Gruntfile.js'
],
options: {}
},
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: [
'Gruntfile.js',
'<%= yeoman.src %>/{,*/}*.js'
]
},
/** ------------- SOURCE CODES MINIMIZATION ------------- */
ngtemplates: {
main: {
options: {
module: 'angularDatatables',
base: '<%= yeoman.src %>'
},
src: '<%= yeoman.src %>/*.html',
dest: '<%= yeoman.build %>/angular-datatables.template.js'
}
},
concat: {
options: {
stripBanners: true,
banner: '<%= yeoman.banner %>'
},
build: {
options: {
stripBanners: false
},
src: ['<%= yeoman.src %>/*.js',
'<%= yeoman.build %>/angular-datatables.template.js'
],
dest: '<%= yeoman.build %>/angular-datatables.js'
},
// Copy the source files with the banner in dist folder
banner: {
src: ['<%= yeoman.build %>/angular-datatables.js'],
dest: '<%= yeoman.dist %>/angular-datatables.js'
},
bannerCSS: {
src: ['<%= yeoman.src %>/angular-datatables.css'],
dest: '<%= yeoman.dist %>/angular-datatables.css'
}
},
cssmin: {
options: {
banner: '<%= yeoman.banner %>'
},
dist: {
files: {
'<%= yeoman.dist %>/angular-datatables.min.css': [
'<%= yeoman.src %>/*.css'
]
}
}
},
ngmin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.build %>',
src: '*.js',
dest: '<%= yeoman.build %>'
}]
}
},
uglify: {
options: {
banner: '<%= yeoman.banner %>'
},
dist: {
files: {
'<%= yeoman.dist %>/angular-datatables.min.js': [
'<%= yeoman.build %>/angular-datatables.js'
]
}
}
},
/** ------------- JS UNIT TESTING + CODE COVERAGE ------------- */
karma: {
unit: {
configFile: 'test/karma.conf.js',
singleRun: true
}
}
});

/** ---------------------------------------------------- */
/** ------------- GRUNT TASKS REGISTRATION ------------- */
/** ---------------------------------------------------- */

// Task to format js source code
grunt.registerTask('format', [
'jsbeautifier'
]);

grunt.registerTask('test', [
'karma'
]);

grunt.registerTask('serve', [
'clean:server',
'express:livereload',
'watch:livereload'
]);

grunt.registerTask('build', [
'clean:dist',
'ngtemplates',
'concat:build',
'ngmin',
'cssmin',
'uglify',
'concat:banner',
'concat:bannerCSS'
]);

grunt.registerTask('default', [
'format',
'jshint',
'test',
'build'
]);
};
46 changes: 43 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
angular-datatables
==================
angular-datatables [![Build Status](https://travis-ci.org/l-lin/angular-datatables.png?branch=master)](https://travis-ci.org/l-lin/angular-datatables) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
================
> angular-datatables
Datables using angular directives
**WORK IN PROGRESS**

Getting started
================
Dependencies
----------------
The required dependencies are:
* [AngularJS](http://angularjs.org/)

Download
----------------
### Manually
The files can be downloaded from:
* Minified [JS](https://github.com/l-lin/angular-datatables/dist/angular-datatables.min.js) and [CSS](https://github.com/l-lin/angular-datatables/dist/angular-datatables.min.css) for production usage
* Un-minified [JS](https://github.com/l-lin/angular-datatables/dist/angular-datatables.js) and [CSS](https://github.com/l-lin/angular-datatables/dist/angular-datatables.css) for development

### With BowerJS
```
$ bower install angular-datatables
```

Installation
----------------
Include the JS and CSS file in your index.html file:
```
<link rel="stylesheet" href="angular-datatables.min.css">
<script src="angular-datatables.min.js"></script>
```
Declare dependencies on your module app like this:
```
angular.module('myModule', ['angularDatatables']);
```

Usage
================
> TODO
License
================
[MIT License](http://en.wikipedia.org/wiki/MIT_License)
29 changes: 29 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "angular-datatables",
"version": "0.0.1",
"author": "l-lin",
"main": [
"dist/angular-datatables.js",
"dist/angular-datatables.min.js",
"dist/angular-datatables.css",
"dist/angular-datatables.min.css"
],
"ignore": [
".bowerrc",
".editorconfig",
".git*",
".jshintrc",
"Gruntfile.js",
"test",
"node_modules",
"src",
".travis.yml",
"vendor"
],
"dependencies": {
"angular": ">= 1.2.7"
},
"devDependencies": {
"angular-mocks": ">= 1.2.7"
}
}
Binary file added favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e2ce5c1

Please sign in to comment.