Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.