Skip to content

Commit

Permalink
Clean up task names
Browse files Browse the repository at this point in the history
  • Loading branch information
mvsde committed Aug 10, 2017
1 parent 455a120 commit 32a78b5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ Create a new project with `front-end-styleguide init`.
## Usage

The following tasks are available:
* `front-end-styleguide` to start the default task.
* `front-end-styleguide dev` to start the default task.
* Watches for file changes.
* Starts Browsersync.
* `front-end-styleguide development` to start the default task
* `front-end-styleguide build:dev` to start the default task
* No file watching / Browsersync.
* `front-end-styleguide preview` to create a prototype preview.
* `front-end-styleguide build:prev` to create a prototype preview.
* Minifies CSS, JavaScript and images.
* Doesn't generate component HTML.
* Errors break pipe.
* `front-end-styleguide production` to create production ready files.
* `front-end-styleguide build` to create production ready files.
* Minifies CSS, JavaScript and images.
* Doesn't generate any HTML.
* Errors break pipe.
Expand Down
24 changes: 19 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,24 +596,36 @@ gulp.task('copy:dist', () => {
/* DEVELOPMENT
* ========================================================================== */

gulp.task('development', ['clean:dev', 'css:lint', 'js:lint'], () => {
gulp.task('build:dev', ['clean:dev'], () => {
runSequence(['css:dev', 'css:sg', 'js:dev', 'js:sg', 'html:dev', 'img:dev', 'copy:dev'])
})

// Deprecated
gulp.task('development', ['build:dev'])

/* PREVIEW
* ========================================================================== */

gulp.task('preview', ['clean:prev', 'css:lint:break', 'js:lint:break'], () => {
gulp.task('build:prev', ['clean:prev'], () => {
runSequence(['css:prev', 'js:prev', 'html:prev', 'img:prev', 'copy:prev'])
})

/* PRODUCTION
// Deprecated
gulp.task('preview', ['build:prev'])

/* BUILD
* ========================================================================== */

gulp.task('production', ['clean:dist', 'css:lint:break', 'js:lint:break'], () => {
gulp.task('build:dist', ['clean:dist'], () => {
runSequence(['css:dist', 'js:dist', 'img:dist', 'copy:dist'])
})

// Alias for `build:dist`
gulp.task('build', ['build:dist'])

// Deprecated
gulp.task('production', ['build'])

/* TEST
* ========================================================================== */

Expand Down Expand Up @@ -690,9 +702,11 @@ gulp.task('watcher', () => {
})
})

gulp.task('default', ['clean:dev', 'css:lint', 'js:lint'], () => {
gulp.task('dev', ['clean:dev', 'css:lint', 'js:lint'], () => {
runSequence(
['css:dev', 'css:sg', 'js:dev', 'js:sg', 'html:dev', 'img:dev', 'copy:dev'],
'browsersync', 'watcher'
)
})

gulp.task('default', ['dev'])
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"scripts": {
"lint": "stylelint **/*.scss && eslint **/*.js",
"pretest": "npm run lint",
"test": "cd test/basic && node ../../bin/front-end-styleguide.js development preview production",
"watchtest": "cd test/basic && node ../../bin/front-end-styleguide.js"
"test": "cd test/basic && node ../../bin/front-end-styleguide.js build:dev build:prev build",
"watchtest": "cd test/basic && node ../../bin/front-end-styleguide.js dev"
},
"main": "index.js",
"bin": "bin/front-end-styleguide.js",
Expand Down

0 comments on commit 32a78b5

Please sign in to comment.