Skip to content

Commit

Permalink
Readme updated, jscs watcher added
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Negometyanov committed Nov 12, 2015
1 parent bd81209 commit 4086dfa
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
18 changes: 17 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,30 @@ To run scss watcher:

``gulp scss:watch``

To lint javascript code:
To run javascript linting and code styling analysis:

``gulp ci``

To run javascript linting:

``gulp lint``

To run javascript linter watcher:

``gulp lint:watch``

To run javascript code style analysis:

``gulp jscs``

To run javascript code style analysis watcher:

``gulp jscs:watch``

To fix javascript code style errors:

``gulp jscs:fix``


.. _Django: http://djangoproject.com
.. _django-polymorphic: https://github.com/chrisglass/django_polymorphic
Expand Down
14 changes: 9 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,21 @@ gulp.task('scss:watch', function () {

// #############################################################################
// LINTING
gulp.task('jscs', function () {
return gulp.src(PROJECT_PATTERNS.lint)
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'));
});

gulp.task('jscs:fix', function () {
return gulp.src(PROJECT_PATH.js + '**/*.js')
.pipe(jscs({fix: true}))
.pipe(gulp.dest(PROJECT_PATH.js));
});

gulp.task('jscs', function () {
return gulp.src(PROJECT_PATTERNS.lint)
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'));
gulp.task('jscs:watch', function () {
gulp.watch(PROJECT_PATTERNS.lint, ['jscs']);
});

gulp.task('lint', function () {
Expand Down

0 comments on commit 4086dfa

Please sign in to comment.