mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
use grunt for jshint and uglify
This commit is contained in:
@@ -1 +1,3 @@
|
||||
/npm-debug.log
|
||||
/build
|
||||
/node_modules
|
||||
@@ -15,5 +15,6 @@
|
||||
"regexp": true,
|
||||
"strict": false,
|
||||
"trailing": true,
|
||||
"unused": true
|
||||
}
|
||||
"unused": true,
|
||||
"globals": { "define": true }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
uglify: {
|
||||
options: {
|
||||
preserveComments: 'some'
|
||||
},
|
||||
build: {
|
||||
src: '<%= pkg.name %>.js',
|
||||
dest: 'build/<%= pkg.name %>.min.js'
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
all: ['*.js']
|
||||
}
|
||||
});
|
||||
|
||||
// Load the plugin that provides the "uglify" task.
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
|
||||
// Default task(s).
|
||||
grunt.registerTask('default', ['jshint', 'uglify']);
|
||||
|
||||
};
|
||||
+7
-4
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"scripts": {
|
||||
"check": "jshint .",
|
||||
"lint": "jshint ."
|
||||
"name" : "jquery.mousewheel",
|
||||
"version": "3.1.1",
|
||||
"devDependencies": {
|
||||
"grunt-contrib-jshint": "~0.2.0",
|
||||
"grunt-contrib-uglify": "~0.1.2",
|
||||
"grunt": "~0.4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user