From a82c61c539068417833747e500017c6c9964090d Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Wed, 30 May 2018 18:49:48 +0200 Subject: [PATCH 1/3] Gulp: Add option to build only --- gulpfile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 9a6da95f..28909e27 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -226,9 +226,14 @@ gulp.task('watch', () => { gulp.watch(paths.demo.src.sass, tasks.sass); }); +// Build distribution +gulp.task('build', () => { + run(tasks.clean, tasks.js, tasks.sass, tasks.sprite); +}); + // Default gulp task gulp.task('default', () => { - run(tasks.clean, tasks.js, tasks.sass, tasks.sprite, 'watch'); + run('build', 'watch'); }); // Publish a version to CDN and demo From 2fce3856912cfb514ea715291213cc3e0febe2cd Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Wed, 30 May 2018 18:58:09 +0200 Subject: [PATCH 2/3] Add npm scripts for linting and building --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 950af4f6..db086d03 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,8 @@ "doc": "readme.md" }, "scripts": { + "build": "gulp build", + "lint": "eslint src/js", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Sam Potts ", From 359acd6bb9fc6158cfa9a10001b2e264fc31929b Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Wed, 30 May 2018 18:58:32 +0200 Subject: [PATCH 3/3] Lint and build in travis --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..d2722414 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - 'lts/*' + +script: + - npm run lint + - npm run build