Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
generator-ng-gulp
Advanced tools
This generator aims to follow the best angular coding practices and make it easy to have a fully tested and deployable app.
Make sure you have yo
and generator-ng-gulp
installed
npm install -g generator-ng-gulp yo
yo ng-gulp <app-name>
You can replace <app-name>
with your app's name, or it will use the name of the folder it is in when being run.
These are limited right now, but plan to grow. These are the questions the generator asks
gulp serve
Serve the app in dev mode, with live css reloading injection as well as for all html/js. Uses the best live reload available with browser-sync.
gulp test
Run all unit tests
gulp test --debug
Run unit tests in debug mode so you can click the debug
button in the browser that pops up.
gulp test --dev
Unit test dev mode where all spec and js files are watched and tests are re-run automatically. Also, your coverage is displayed with browser-sync and updated automatically as you work
gulp build
Build all js/css/html/images etc for production. Placed into dist/
folder.
gulp protractor
Run all e2e tests.
There are a couple sub-generators to help with keeping your app structured
All components and sub-modules go in the app/modules
folder. Inside this folder is a routes
folder where all routes are kept.
You can generate sub-modules or routes with sub-generators
yo ng-gulp:module <module-path-with-name>
This generator will allow you to make the following angular components:
You are presented with options as to which ones you want. If you decide later you want more, just re-run the sub-generator with the same <module-path-with-name
> and choose the piece you want.
<module-path-with-name>
looks something like this:
core/api/friends
This would make a friends module in the folder app/modules/core/api/friends
components/navbar
This would make a navbar module in the folder app/modules/components/navbar
table
This would make a table module in the folder app/modules/table
If these folder don't already exist, they are created. If you are making extra components in a folder already containing a *.module.js
file, then it will only add the pieces needed. Each angular component asked for comes with associated test files, and these new scripts are attached to the index.html automatically.
Make sure you designate in the main generator that you want routing if you plan on using this generator
yo ng-gulp:route <route-name> <route-path-string>
<route-name>
gives the route folder a name, as well as the state name if using ui-router
.
<route-path-string>
is the string to use for the path. (ie. /applications/:id
, or /stuff/:stuffId/thing
)
All routes get added to the app/modules/routes
folder and automatically added to the index.html
. If running gulp serve
these routes should be immediately visitable.
A new e2e test is created for each route and placed in test/e2e
.
gulp test --debug
to not have to restart when files changeng-app
FAQs
generator for building an angular web app with gulp
We found that generator-ng-gulp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.