Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
grunt-parallelize
Advanced tools
Make your task parallel.
This plugin divides src files of your task and executes them in parallel.
If your task has too many src files and it's CPU intensive like JSHint, this plugin reduces your build time significantly.
If you haven't used Grunt before, be sure to check out the Getting Started guide. Then you can install this plugin to your project with:
$ npm install grunt-parallelize --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-parallelize');
In your project's Gruntfile, add a section named parallelize
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
jshint: {
all: {
src: './**/*.js'
}
},
parallelize: {
jshint: {
// Run jshint:all task with 2 child processes in parallel.
all: 2
},
},
});
And just prefix parallelize:
to your task name.
# Normal single process
$ grunt jshint:all
Running "jshint:all" (jshint) task
>> 101 files lint free.
Done, without errors.
# Parallelize!
$ grunt parallelize:jshint:all
Running "parallelize:jshint:all" (parallelize) task
Running "jshint:all" (jshint) task
>> 51 files lint free.
Done, without errors.
Running "jshint:all" (jshint) task
>> 50 files lint free.
Done, without errors.
Done, without errors.
There are concurrent or parallel processing grunt plugins like grunt-concurrent or grunt-parallel. They execute different tasks in parallel, but this plugin divides a task into multi processes.
Type: Number
A number of processes.
This is equivalent with the above.
parallelize: {
options: {
processes: 2
},
jshint: {
all: true
},
},
grunt-parallelize supports all Grunt standard files formats.
src
If only src
is specified, the src files are devided per each process.
grunt.initConfig({
jshint: {
all: {
src: ['src/1.js', 'src/2.js', 'src/3.js']
}
},
parallelize: {
jshint: {
all: 2
},
},
});
=> parallelized as:
src/1.js
and src/2.js
src/3.js
src
and dest
If dest
is specified, the dest files are devided per each process.
grunt.initConfig({
concat: {
all: {
files: [
{src: ['src/1.js', 'src/2.js'], dest: 'dest/1.js'},
{src: ['src/3.js', 'src/4.js'], dest: 'dest/2.js'},
{src: ['src/5.js'], dest: 'dest/3.js'},
],
}
},
parallelize: {
jshint: {
all: 2
},
},
});
=> parallelized as:
dest/1.js
(including 'src/1.js' and 'src/2.js') and dest/2.js
(including 'src/3.js' and 'src/4.js')dest/3.js
(including 'src/5.js')This plugin is inspired by sindresorhus's grunt-concurrent. Thanks!
dest
. Fix ENAMETOOLONG #13MIT License: Teppei Sato <teppeis@gmail.com>
FAQs
Parallelize your task.
The npm package grunt-parallelize receives a total of 2,170 weekly downloads. As such, grunt-parallelize popularity was classified as popular.
We found that grunt-parallelize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.