Merge "Replace Grunt tasks with npm scripts in package.json"

This commit is contained in:
jenkins-bot 2020-02-27 17:48:52 +00:00 committed by Gerrit Code Review
commit 5b1d77fb9d
5 changed files with 2839 additions and 3206 deletions

5
.eslintignore Normal file
View file

@ -0,0 +1,5 @@
/.storybook/
/docs/
/i18n/
/node_modules/
/vendor/

5
.stylelintignore Normal file
View file

@ -0,0 +1,5 @@
/.storybook/
/docs/
/node_modules/
/skinStyles/jquery.ui/
/vendor/

View file

@ -1,37 +0,0 @@
/* eslint-env node, es6 */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'skin.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
extensions: [ '.js', '.json' ],
cache: true
},
all: [
'**/*.js{,on}',
'!{vendor,node_modules,docs}/**'
]
},
banana: conf.MessagesDirs,
stylelint: {
options: {
syntax: 'less'
},
all: [
'*.{less,css}',
'**/*.{less,css}',
'!node_modules/**',
'!docs/**',
'!skinStyles/jquery.ui/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
grunt.registerTask( 'default', 'test' );
};

5986
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,11 @@
"private": true, "private": true,
"scripts": { "scripts": {
"storybook": "./dev-scripts/setup-storybook.sh && start-storybook -p 6006", "storybook": "./dev-scripts/setup-storybook.sh && start-storybook -p 6006",
"test": "grunt test && npm run doc", "test": "npm -s run lint && npm run doc",
"lint": "npm -s run lint:js && npm -s run lint:styles && npm -s run lint:i18n",
"lint:js": "eslint --cache --max-warnings 0 .",
"lint:styles": "stylelint \"**/*.{less,css}\"",
"lint:i18n": "banana-checker --requireLowerCase=0 i18n/",
"jsdoc": "jsdoc -c jsdoc.json", "jsdoc": "jsdoc -c jsdoc.json",
"doc": "npm run jsdoc && npm run build-storybook", "doc": "npm run jsdoc && npm run build-storybook",
"build-storybook": "./dev-scripts/setup-storybook.sh && build-storybook -o docs/ui" "build-storybook": "./dev-scripts/setup-storybook.sh && build-storybook -o docs/ui"
@ -12,15 +16,13 @@
"@storybook/html": "5.2.8", "@storybook/html": "5.2.8",
"babel-loader": "8.0.6", "babel-loader": "8.0.6",
"eslint-config-wikimedia": "0.15.0", "eslint-config-wikimedia": "0.15.0",
"grunt": "1.0.4",
"grunt-banana-checker": "0.8.1", "grunt-banana-checker": "0.8.1",
"grunt-eslint": "22.0.0",
"grunt-stylelint": "0.13.0",
"jsdoc": "3.6.3", "jsdoc": "3.6.3",
"jsdoc-wmf-theme": "0.0.3", "jsdoc-wmf-theme": "0.0.3",
"less": "3.8.1", "less": "3.8.1",
"less-loader": "4.1.0", "less-loader": "4.1.0",
"mustache": "3.0.1", "mustache": "3.0.1",
"stylelint-config-wikimedia": "0.8.0" "stylelint": "10.0.1",
"stylelint-config-wikimedia": "0.9.0"
} }
} }