From f02202c244be78f3bf68470925bfcc7326f55fb4 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sun, 24 Jul 2016 17:32:50 -0400 Subject: [PATCH] chore: get rid of gulp (#593) The only thing we were still using gulp for was compiling SCSS. Signed-off-by: Juan Cruz Viotti --- build/css/main.css | 1 + docs/CONTRIBUTING.md | 27 +++------------------------ gulpfile.js | 42 ------------------------------------------ package.json | 9 ++++----- 4 files changed, 8 insertions(+), 71 deletions(-) delete mode 100644 gulpfile.js diff --git a/build/css/main.css b/build/css/main.css index 09b0b06c..58710df3 100644 --- a/build/css/main.css +++ b/build/css/main.css @@ -6676,3 +6676,4 @@ body { .section-header > .btn, .section-header > .progress-button { padding-left: 3px; padding-right: 3px; } + diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 7b8ef167..9504fb7f 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -15,7 +15,6 @@ Prerequisites - [NodeJS](https://nodejs.org). - [Bower](http://bower.io). -- [Gulp](http://gulpjs.com). - [UPX](http://upx.sourceforge.net). - [Python](https://www.python.org). @@ -77,24 +76,10 @@ node bin/etcher Developing ---------- -We rely on [gulp] to provide an automated developing workflow in which your -changes will automatically be detected and the necessary resources will be -rebuilt for you. +We rely on various `npm` scripts to perform some common tasks: -First make sure you have [gulp] installed as a global dependency: - -```sh -$ npm install -g gulp -``` - -Run the `watch` task to initialise the build system. We encourage to have this -command running in the background all the time as you develop, and check the -output from time to time, since it'll let you know of any issues and/or -warnings in your changes: - -```js -$ gulp watch -``` +- `npm run lint`: Run the linter. +- `npm run sass`: Compile SCSS files. We make use of [EditorConfig] to communicate indentation, line endings and other text editing default. We encourage you to install the relevant plugin in @@ -126,11 +111,6 @@ Use the following steps to ensure everything goes flawlessly: Testing ------- -In order to avoid inaccurate results, the test suites run in a real Electron -instance each in the respective process. This means that running the test suite -is not a cheap operation and therefore we decided to not run it by default in -the `watch` gulp task to not disrupt the user development workflow. - To run the test suite, run the following command: ```sh @@ -194,7 +174,6 @@ systems we support. Don't hesitate to get in touch if you have any questions or need any help! [ARCHITECTURE]: https://github.com/resin-io/etcher/blob/master/docs/ARCHITECTURE.md -[gulp]: http://gulpjs.com [EditorConfig]: http://editorconfig.org [commitizen]: https://commitizen.github.io/cz-cli/#making-your-repo-commitizen-friendly [shrinkwrap]: https://docs.npmjs.com/cli/shrinkwrap diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index ea79ef5f..00000000 --- a/gulpfile.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2016 Resin.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -const gulp = require('gulp'); -const sass = require('gulp-sass'); - -const paths = { - scripts: [ - './tests/**/*.spec.js', - './lib/**/*.js', - 'gulpfile.js' - ], - sass: [ - './lib/gui/**/*.scss' - ], - sassMain: './lib/gui/scss/main.scss' -}; - -gulp.task('sass', function() { - return gulp.src(paths.sassMain) - .pipe(sass().on('error', sass.logError)) - .pipe(gulp.dest('./build/css')); -}); - -gulp.task('watch', [ 'sass' ], function() { - gulp.watch(paths.sass, [ 'sass' ]); -}); diff --git a/package.json b/package.json index 383d9dad..71fc0262 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ }, "scripts": { "test": "npm run lint && electron-mocha --recursive --renderer tests/gui -R min", - "lint": "eslint gulpfile.js lib tests scripts bin", + "sass": "node-sass ./lib/gui/scss/main.scss > build/css/main.css", + "lint": "eslint lib tests scripts bin", "start": "electron lib/start.js", "shrinkwrap": "node ./scripts/shrinkwrap.js" }, @@ -27,7 +28,6 @@ "assets/osx", "appveyor.yml", "bower.json", - "gulpfile.js", "screenshot.png", "tests", "etcher-release", @@ -97,10 +97,9 @@ "electron-packager": "^7.0.1", "electron-prebuilt": "1.2.6", "eslint": "^2.13.1", - "gulp": "^3.9.0", - "gulp-sass": "^2.0.4", "jsonfile": "^2.3.1", - "mochainon": "^1.0.0" + "mochainon": "^1.0.0", + "node-sass": "^3.8.0" }, "config": { "commitizen": {