Merge "Add npm entry point"

This commit is contained in:
jenkins-bot 2016-03-01 21:16:12 +00:00 committed by Gerrit Code Review
commit accf17bc73
4 changed files with 47 additions and 5 deletions

1
.jshintignore Normal file
View file

@ -0,0 +1 @@
node_modules

View file

@ -6,7 +6,7 @@
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"noempty": true,
@ -23,9 +23,9 @@
// Enforcing
// Environment
"browser": true,
"jquery": true,
"predef": [
"mediaWiki",
"jQuery"
]
"globals": {
"mediaWiki": false
}
}

30
Gruntfile.js Normal file
View file

@ -0,0 +1,30 @@
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
// grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.initConfig( {
jshint: {
options: {
jshintrc: true
},
all: [
'**/*.js',
'!node_modules/**'
]
},
// banana: {
// all: 'i18n/'
// },
jsonlint: {
all: [
'**/*.json',
'!node_modules/**'
]
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint' /* 'banana' */ ] );
grunt.registerTask( 'default', 'test' );
};

11
package.json Normal file
View file

@ -0,0 +1,11 @@
{
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"grunt-contrib-jshint": "1.0.0",
"grunt-jsonlint": "1.0.7"
}
}