Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Automatically install Bower component references into your HTML or Javascript files.
Automatically install Bower component references into your HTML or Javascript files.
Bowinst is a command-line application to install Bower component references in your source files. Bowinst only works with Bower 1.3.0 or later.
<script>
tags or css <link>
tags from your Bower components into your source files.angular.module('name',[...])
..bowinst.js
file.sass
, less
, coffee
, etc) or use the simple extension system to add more complex logic.async
to a <script>
tag after bowinst created the tag, further bowinst usage will not remove or alter that <script>
tag.npm install -g bowinst
You'll need to configure bowinst
before you can get started. Run bowinst init
in your project directory to configure it to use bowinst
. This configuration must be done in every project you wish to use bowinst
on.
Here's an example of running bowinst init
:
$ bowinst init
Enter the HTML file where <script> and <link> tags should be added (index.html) app/index.html
If this is an Angular project, enter the JS file where the main Angular module is created. If not,
just hit Enter. (app.js) app/scripts/app.js
>> .bowerrc created
>> .bowinst.js created
Good to go!
bowinst init
does the following:
.bowerrc
so Bower will trigger bowinst
after each Bower install/uninstall..bowinst.js
to tell Bowinst where your main HTML file is and, if you're using Angular, where your Angular module setup code exists. If your answers are the same as the Bowinst's defaults (index.html
and app.js
), then .bowinst.js
won't be created.Next you'll need to add the comment markers to your HTML file so Bowinst knows where to put your <script>
and <link>
tags. For <script>
tags, use these surrounding comment markers:
<!-- bower-js:start -->
<!-- bower-js:end -->
For <link>
tags, use these:
<!-- bower-css:start -->
<!-- bower-css:end -->
That's it. Bowinst will now automatically install and uninstall <script>
, <link>
, and Angular module references into your project automatically.
When installing a reusable Angular component, if it's bower.json
includes an angularModule
property then Bowinst will add that for you. For example, if you were installing an angular component named reusableAngularComponent
, it would change this:
angular.module('myApp',['ngRoute']);
into:
angular.module('myApp',['ngRoute','reusableAngularComponent']);
Please help spread the word to Angular component authors. Let them know to add the angularModule
property to their bower.json
files.
There are many more configuration options as well as the ability for anyone to create their own extensions. Please see the Advanced documentation for more details.
app.js
.FAQs
Automatically install Bower component references into your HTML or Javascript files.
The npm package bowinst receives a total of 1 weekly downloads. As such, bowinst popularity was classified as not popular.
We found that bowinst 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.