Skip to content

Commit 17328ec

Browse files
committed
Added Grunt support. Minor fixes.
1 parent 9e47828 commit 17328ec

9 files changed

+106
-27
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/bower_components
2+
/node_modules
3+
package-lock.json
4+

.jshintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"indent": 3,
3+
"quotmark": "single",
4+
"laxbreak": true,
5+
"sub": true
6+
}

.npmignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Gruntfile.js
2+
bower.json
3+
bower_components
4+
package-lock.json
5+
.eslintignore
6+
.eslintrc
7+
.jslintrc
8+
.gitignore

Gruntfile.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
module.exports = function(grunt) {
2+
3+
grunt.registerTask('default', [
4+
'jshint',
5+
'uglify'
6+
]);
7+
8+
grunt.registerTask('watch', [ 'watch' ]);
9+
10+
grunt.initConfig({
11+
pkg: grunt.file.readJSON('package.json'),
12+
13+
jshint: {
14+
options:{
15+
jshintrc: '.jshintrc'
16+
},
17+
all: [
18+
'js/dataTables.checkboxes.js',
19+
]
20+
},
21+
22+
uglify: {
23+
options: {
24+
mangle: true,
25+
sourceMap: true,
26+
banner:
27+
'/*! <%= pkg.title %> v<%= pkg.version %>' +
28+
' - <%= pkg.homepage.replace("https://", "") %>' +
29+
' - License: <%= pkg.license %>' +
30+
' - Author: <%= pkg.author.name %>' +
31+
' / <%= pkg.author.url.replace("https://", "") %>' +
32+
' */',
33+
},
34+
js: {
35+
files: {
36+
'js/dataTables.checkboxes.min.js': [ 'js/dataTables.checkboxes.js' ]
37+
}
38+
}
39+
},
40+
41+
watch: {
42+
js: {
43+
files: [
44+
'js/dataTables.checkboxes.js'
45+
],
46+
tasks: [ 'jshint', 'uglify' ],
47+
options: {
48+
livereload: true
49+
}
50+
}
51+
}
52+
});
53+
54+
grunt.loadNpmTasks('grunt-contrib-jshint');
55+
grunt.loadNpmTasks('grunt-contrib-uglify');
56+
grunt.loadNpmTasks('grunt-contrib-watch');
57+
};

bower.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
],
1717
"ignore": [
1818
"/.*",
19+
"bower_components",
20+
"node_modules",
21+
"Gruntfile.js",
1922
"package.json"
2023
]
2124
}

js/dataTables.checkboxes.js

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
/*! Checkboxes 1.2.12-dev
2-
* Copyright (c) Gyrocode (www.gyrocode.com)
3-
* License: MIT License
4-
*/
5-
6-
/**
7-
* @summary Checkboxes
8-
* @description Checkboxes extension for jQuery DataTables
1+
/*!
2+
* jQuery DataTables Checkboxes (https://www.gyrocode.com/projects/jquery-datatables-checkboxes/)
3+
* Checkboxes extension for jQuery DataTables
4+
*
95
* @version 1.2.12-dev
10-
* @file dataTables.checkboxes.js
11-
* @author Gyrocode (http://www.gyrocode.com/projects/jquery-datatables-checkboxes/)
12-
* @contact http://www.gyrocode.com/contacts
13-
* @copyright Copyright (c) Gyrocode
14-
* @license MIT License
6+
* @author Gyrocode LLC (https://www.gyrocode.com)
7+
* @copyright (c) Gyrocode LLC
8+
* @license MIT
159
*/
16-
1710
(function( factory ){
1811
/* eslint-disable */
1912
if ( typeof define === 'function' && define.amd ) {
@@ -1212,11 +1205,11 @@
12121205

12131206

12141207
/**
1215-
* Version information
1216-
*
1217-
* @name Checkboxes.version
1218-
* @static
1219-
*/
1208+
* Version information
1209+
*
1210+
* @name Checkboxes.version
1211+
* @static
1212+
*/
12201213
Checkboxes.version = '1.2.12-dev';
12211214

12221215

js/dataTables.checkboxes.min.js

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dataTables.checkboxes.min.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
{
22
"name": "jquery-datatables-checkboxes",
3-
"version": "1.2.11",
3+
"title": "jQuery DataTables Checkboxes",
4+
"version": "1.2.12-dev",
45
"description": "Checkboxes is an extension for the jQuery DataTables library that provides universal solution for working with checkboxes in a table.",
5-
"main": "./js/dataTables.checkboxes.js",
6+
"main": "js/dataTables.checkboxes.js",
67
"keywords": [
78
"jQuery",
89
"DataTables",
910
"checkboxes"
1011
],
1112
"author": {
12-
"name": "Gyrocode",
13+
"name": "Gyrocode LLC",
1314
"url": "https://www.gyrocode.com"
1415
},
1516
"license": "MIT",
1617
"bugs": {
1718
"url": "https://github.com/gyrocode/jquery-datatables-checkboxes/issues"
1819
},
1920
"homepage": "https://www.gyrocode.com/projects/jquery-datatables-checkboxes/",
21+
"devDependencies": {
22+
"grunt": "^1.1.0",
23+
"grunt-cli": "latest",
24+
"grunt-contrib-jshint": "latest",
25+
"grunt-contrib-uglify": "latest",
26+
"grunt-contrib-watch": "latest",
27+
"grunt-usemin": "latest"
28+
},
2029
"dependencies": {
2130
"jquery": ">=1.7",
2231
"datatables.net": ">=1.10.8"

0 commit comments

Comments
 (0)