Updated NPM scripts & Gulp tasks

- updated names & ordering
- set "gulp clean" to also remove generated examples
- added "gulp lint" to list of default tasks
master
Futago-za Ryuu 7 years ago
parent b4e5b97a2e
commit 37698d8981

@ -51,8 +51,13 @@ task( "test", () => gulp
// Run benchmarks.
task( "benchmark", () => node( "test/benchmark/run" ) );
// Generate the grammar parser.
task( "build:parser", () =>
node( "bin/peg src/parser.pegjs -o lib/parser.js" )
);
// Create the browser build.
task( "browser:build", () => {
task( "build:browser", () => {
const HEADER = dedent`
@ -82,15 +87,12 @@ task( "browser:build", () => {
} );
// Delete the browser build.
task( "browser:clean", () => del( "browser" ) );
// Generate the grammar parser.
task( "parser", () =>
node( "bin/peg src/parser.pegjs -o lib/parser.js" )
// Delete the generated files.
task( "clean", () =>
del( [ "browser", "examples/*.js" ] )
);
// Default task.
task( "default", cb =>
runSequence( "benchmark", "test", cb )
runSequence( "lint", "benchmark", "test", cb )
);

@ -48,13 +48,13 @@
"scripts": {
"lint": "gulp lint",
"spec": "gulp test",
"test": "gulp",
"benchmark": "gulp benchmark",
"build:parser": "gulp build:parser",
"build:browser": "gulp build:browser",
"clean": "gulp clean",
"test:impact": "node test/impact",
"test:server": "node test/server/run",
"benchmark": "gulp benchmark",
"browser:build": "gulp browser:build",
"browser:clean": "gulp browser:build",
"parser": "gulp parser"
"test": "gulp"
},
"devDependencies": {
"babel-preset-es2015": "6.24.1",

Loading…
Cancel
Save