
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Download it on NPM: npm install grunt2gulp
Converts a Gruntfile.js to a gulp-compliant file. Why? Because if you're going to create a new tool to replace an old one, why not automate the process of porting configuration files over.
In the future, a standard for building JavaScript files should emerge and be usable by whatever build tools exist. Maybe something like GNU Make? Ah, but that's a mere fantasy...
Print out a gulp file to standard output:
grunt2gulp.js Gruntfile.js
Save the generated gulp file:
grunt2gulp.js Gruntfile.js > gulpfile.js
This is a very very rough tool, you will need to go over the generated gulp file to ensure that it works and is correct.
To see the difference, run the examples/simple-gruntfile.js
through
grunt2gulp and compare it to examples/simple-gulpfile.js
. It got 90%
of the way to a complete conversion though and it took only a bit of
tweaking to get it to that state.
If there are duplicate tasks, a warning is added to the code.
It loads up the Gruntfile and emulates Grunt's API. When it's done looping through all the tasks in the grunt config, it shoves them into definitions or tasks. Definitions are non-objects, like strings, which need to be declared as variables when using Gulp. Tasks are converted into Gulp tasks but some special cases have to be handled, such as Karma and Watch.
The code is dirty because Grunt is very permissive in its input. You can specify files in multiple ways: as a string, as a list of strings, or within a files property as a string or list. If Grunt were more modular it would be possible to just rip out the parser that Grunt uses to turn a config into a set of tasks without also importing the task running capability and all the other stuff.
The core functions you will want to check out are processGruntTask
and processGruntConfig
.
When reporting an issue with grunt2gulp.js, please try to include the Gruntfile that you were trying to convert and the error message that you received.
You can report issues here: https://github.com/omouse/grunt2gulp.js/issues
You can generate the documentation using jsdoc
:
jsdoc node_modules/grunt2gulp/bin/grunt2gulp.js
Licensed under the GPL version 3 or later.
Copyright (C) 2014-2016 Rudolf Olah omouse@gmail.com
See LICENSE for full text of license.
FAQs
converts Gruntfile.js to a gulpjs-compatible file
The npm package grunt2gulp receives a total of 283 weekly downloads. As such, grunt2gulp popularity was classified as not popular.
We found that grunt2gulp 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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.