Gathering detailed insights and metrics for gulp-nodemon-tempfix
Gathering detailed insights and metrics for gulp-nodemon-tempfix
Gathering detailed insights and metrics for gulp-nodemon-tempfix
Gathering detailed insights and metrics for gulp-nodemon-tempfix
npm install gulp-nodemon-tempfix
Typescript
Module System
Node Version
NPM Version
35.4
Supply Chain
77
Quality
64
Maintenance
25
Vulnerability
95
License
JavaScript (100%)
Total Downloads
949
Last Day
1
Last Week
4
Last Month
6
Last Year
54
526 Stars
150 Commits
76 Forks
15 Watching
10 Branches
25 Contributors
Latest Version
2.0.4
Package Id
gulp-nodemon-tempfix@2.0.4
Size
3.14 kB
NPM Version
3.3.4
Node Version
4.1.1
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
4
Compared to previous week
Last month
50%
6
Compared to previous month
Last year
-43.2%
54
Compared to previous year
4
5
Published on NPM as gulp-nodemon-tempfix until https://github.com/JacksonGariety/gulp-nodemon/pull/91 is merged
it's gulp + nodemon + convenience
1$ npm install --save-dev gulp-nodemon
Gulp-nodemon looks almost exactly like regular nodemon, but it's made for use with gulp tasks.
You can pass an object to gulp-nodemon with options like you would in nodemon config.
Example below will start server.js
in development
mode and watch for changes, as well as watch all .html
and .js
files in the directory.
1gulp.task('start', function () { 2 nodemon({ 3 script: 'server.js' 4 , ext: 'js html' 5 , env: { 'NODE_ENV': 'development' } 6 }) 7})
NOTE: This feature requires Node v0.12 because of child_process.spawnSync
.
Nodemon is powerful but lacks the ability to compile/cleanup code prior to restarting the application... until now! Most build systems can never be complete without compilation, and now it works harmoniously with your nodemon loop.
If you want to lint your code when you make changes that's easy to do with a simple event. But what if you need to wait while your project re-builds before you start it up again? This isn't possible with vanilla nodemon, and can be tedious to implement yourself, but it's easy with gulp-nodemon:
1nodemon({ 2 script: 'index.js' 3, tasks: ['browserify'] 4})
What if you want to decouple your build processes by language? Or even by file? Easy, just set the tasks
option to a function. Gulp-nodemon will pass you the list of changed files and it'll let you return a list of tasks you want run.
1nodemon({ 2 script: './index.js' 3, ext: 'js css' 4, tasks: function (changedFiles) { 5 var tasks = [] 6 changedFiles.forEach(function (file) { 7 if (path.extname(file) === '.js' && !~tasks.indexOf('lint')) tasks.push('lint') 8 if (path.extname(file) === '.css' && !~tasks.indexOf('cssmin')) tasks.push('cssmin') 9 }) 10 return tasks 11 } 12})
gulp-nodemon returns a stream just like any other NodeJS stream, except for the on
method, which conveniently accepts gulp task names in addition to the typical function.
[event]
is an event name as a string. See nodemon events.[tasks]
An array of gulp task names or a function to execute.The following example will run your code with nodemon, lint it when you make changes, and log a message when nodemon runs it again.
1// Gulpfile.js 2var gulp = require('gulp') 3 , nodemon = require('gulp-nodemon') 4 , jshint = require('gulp-jshint') 5 6gulp.task('lint', function () { 7 gulp.src('./**/*.js') 8 .pipe(jshint()) 9}) 10 11gulp.task('develop', function () { 12 nodemon({ script: 'server.js' 13 , ext: 'html js' 14 , ignore: ['ignored.js'] 15 , tasks: ['lint'] }) 16 .on('restart', function () { 17 console.log('restarted!') 18 }) 19})
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 5/12 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
31 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More