From 8d905f34e07bf75ebc3d1f8f41c58de3e7179914 Mon Sep 17 00:00:00 2001 From: Arctic Ice Studio Date: Sun, 7 Jan 2018 16:47:02 +0100 Subject: [PATCH] Replace gulp.js with npm scripts "gulp.js" (1) is meant to be used as streaming build tool for larger projects with many tasks to combine them to a simple workflow. Nord Hyper is a small project with only one build /development task where gulp.js is more overhead / too heavy weight. The "lint" task should be replaced with a simple npm script command to run "eslint". References: (1) https://gulpjs.com GH-27 --- .circleci/config.yml | 5 +---- .travis.yml | 4 +--- docs/development/testing.md | 2 +- gulpfile.js | 39 ------------------------------------- package.json | 8 +++----- 5 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 gulpfile.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 12e9dbe..236c01d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,12 +15,9 @@ jobs: - image: circleci/node:8.7 steps: - checkout - - run: - name: install-global-gulp-cli - command: sudo npm install -g gulp-cli - run: name: npm-install command: npm install - run: name: lint - command: gulp --harmony lint + command: npm run lint diff --git a/.travis.yml b/.travis.yml index 1beb97c..48fafab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,5 @@ os: before_install: - rm -rf ./node_modules before_script: - - npm install -g gulp-cli - - npm install gulp - npm install -script: gulp --harmony lint +script: npm run lint diff --git a/docs/development/testing.md b/docs/development/testing.md index d1dfebf..3b7c099 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -5,7 +5,7 @@ Nord Hyper uses [ESLint][eslint] to analyse the source code. To show the current lint status run ```sh -gulp lint +npm run lint ``` [installation]: ../getting-started/installation.md diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 3b0ba01..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2017-present Arctic Ice Studio - * Copyright (c) 2017-present Sven Greb - * - * Project: Nord Hyper - * Repository: https://github.com/arcticicestudio/nord-hyper - * License: MIT - * References: - * http://gulpjs.com - * https://www.npmjs.com - */ - -/*+---------+ - + Imports + - +---------+*/ -const gulp = require("gulp-help")(require("gulp")); -const eslint = require("gulp-eslint"); - -/*+-------+ - + Tasks + - +-------+*/ -/** - * Shows the help. - * - * @since 0.1.0 - */ -gulp.task("default", ["help"]); - -/** - * Lints the color theme index file. - * - * @since 0.1.0 - */ -gulp.task("lint", "Lints the color theme index file", () => { - return gulp.src("index.js") - .pipe(eslint()) - .pipe(eslint.format()) - .pipe(eslint.failAfterError()); -}); diff --git a/package.json b/package.json index 71c15c2..e52f388 100644 --- a/package.json +++ b/package.json @@ -31,14 +31,12 @@ "scripts": { "docs:build": "npm run docs:clean && gitbook install ./docs && gitbook build ./docs ./build/docs", "docs:clean": "node_modules/.bin/del ./build/docs", - "docs:dev": "npm run docs:build && gitbook serve ./docs ./build/docs" + "docs:dev": "npm run docs:build && gitbook serve ./docs ./build/docs", + "lint": "eslint --color index.js" }, "devDependencies": { "del-cli": "1.1.0", "eslint": "4.15.0", - "gitbook-cli": "2.3.2", - "gulp": "3.9.1", - "gulp-eslint": "4.0.1", - "gulp-help": "1.6.1" + "gitbook-cli": "2.3.2" } }