Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #70 from jedmao/gulp_usecase
Browse files Browse the repository at this point in the history
update gulp usecase.
  • Loading branch information
gucong3000 authored Jun 6, 2017
2 parents 92db53f + e7822e9 commit 435e955
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 18 deletions.
64 changes: 61 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,62 @@
.nyc_output/
coverage/
dist/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


dist
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,27 +501,16 @@ The [check](#check), [fix](#fix) and [infer](#infer) API commands are all [Gulp]
```js
var gulp = require('gulp');
var eclint = require('eclint');
var reporter = require('gulp-reporter');
var path = require('path');
gulp.task('check', function() {
var hasErrors = false;
var stream = gulp.src([
return gulp.src([
'*',
'lib/**/*.js'
])
.pipe(eclint.check({
reporter: function(file, message) {
hasErrors = true;
var relativePath = path.relative('.', file.path);
console.error(relativePath + ':', message);
}
}));
stream.on('finish', function() {
if (hasErrors) {
process.exit(1);
}
});
return stream;
.pipe(eclint.check())
.pipe(reporter());
});
gulp.task('fix', function() {
Expand Down

0 comments on commit 435e955

Please sign in to comment.