Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gulp task "dev", a shorthand for watch with parameters #192

Merged
merged 1 commit into from
Nov 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,11 @@ The demo generates styleguide to `demo-output` directory.
Projects contains small demo stylesheet that can be used to develop the UI.
Start watching UI changes in lib/app and build the app using the demo stylesheets:

gulp watch --source ./lib/app --output ./demo-output --config ./lib/app/styleguide_config.json
gulp dev

Running the task also runs a small development server, and does the same as:

Running the task also runs a small development server
gulp watch --source ./lib/app --output ./demo-output --config ./lib/app/styleguide_config.json

### Running tests

Expand Down
7 changes: 7 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ gulp.task('assets', function() {
.pipe(gulp.dest(distPath + '/assets'));
});

gulp.task('dev', function() {
sourcePath = util.env.source ? util.env.source.replace(/\/$/, '') : 'lib/app';
outputPath = util.env.output ? util.env.output.replace(/\/$/, '') : 'demo-output';
configPath = util.env.config ? util.env.config.replace(/\/$/, '') : './lib/app/styleguide_config.json';
runSequence('watch');
});

gulp.task('watch', [], function() {
// Enable server by default when watching
// Config have possibility to still override this
Expand Down