mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
set up jshint task
This commit is contained in:
parent
7b807ef5af
commit
f50a9ac38d
60
static/ng/Gruntfile.js
Normal file
60
static/ng/Gruntfile.js
Normal file
@ -0,0 +1,60 @@
|
||||
/*global module:false*/
|
||||
module.exports = function(grunt) {
|
||||
|
||||
'use strict';
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
// Task configuration.
|
||||
jshint: {
|
||||
options: {
|
||||
browser: true,
|
||||
curly: true,
|
||||
freeze: true,
|
||||
bitwise: true,
|
||||
eqeqeq: true,
|
||||
strict: true,
|
||||
immed: true,
|
||||
latedef: false,
|
||||
newcap: false,
|
||||
smarttabs: true,
|
||||
noarg: true,
|
||||
devel: true,
|
||||
sub: true,
|
||||
undef: true,
|
||||
unused: false,
|
||||
boss: true,
|
||||
eqnull: true,
|
||||
globals: {
|
||||
jQuery: true,
|
||||
angular: true,
|
||||
$: true,
|
||||
}
|
||||
},
|
||||
gruntfile: {
|
||||
src: 'Gruntfile.js'
|
||||
},
|
||||
scripts: {
|
||||
src: ['resources/**/**/*.js']
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
gruntfile: {
|
||||
files: '<%= jshint.gruntfile.src %>',
|
||||
tasks: ['jshint:gruntfile']
|
||||
},
|
||||
scripts: {
|
||||
files: '<%= jshint.scripts.src %>',
|
||||
tasks: ['jshint:scripts']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// These plugins provide necessary tasks.
|
||||
grunt.loadNpmTasks('grunt-contrib-nodeunit');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['jshint']);
|
||||
|
||||
};
|
10
static/ng/package.json
Normal file
10
static/ng/package.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user