Gathering detailed insights and metrics for grunt-bower-requirejs-alias
Gathering detailed insights and metrics for grunt-bower-requirejs-alias
Gathering detailed insights and metrics for grunt-bower-requirejs-alias
Gathering detailed insights and metrics for grunt-bower-requirejs-alias
Automagically wire-up installed Bower components into your RequireJS config
npm install grunt-bower-requirejs-alias
Typescript
Module System
Min. Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
61 Commits
25 Watchers
2 Branches
2 Contributors
Updated on Dec 21, 2014
Latest Version
0.7.0
Package Id
grunt-bower-requirejs-alias@0.7.0
Size
3.71 kB
NPM Version
1.3.5
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Automagically wire-up installed Bower components into your RequireJS config, with the ability to alias and prefix module IDs.
If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:
1npm install grunt-bower-requirejs-alias --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
1grunt.loadNpmTasks('grunt-bower-requirejs-alias');
1grunt.initConfig({
2 bower: {
3 target: {
4 rjsConfig: 'app/config.js'
5 }
6 }
7});
8
9grunt.loadNpmTasks('grunt-bower-requirejs');
10
11grunt.registerTask('default', ['bower']);
When the bower
task is run it merges the paths of installed Bower components into the paths
property of your RequireJS config.
You trigger this task from another task in your Gruntfile or through the CLI: grunt bower
Required
Type: String
Specify a relative path to your RequireJS config.
Make sure to specify the baseUrl
property in your RequireJS config if you want to use relative paths.
Default: []
Type: Array
Specify components to be excluded from being added to the RequireJS config.
Default: null
Type: String
Generate paths relative to a specific directory. This option is for anyone not using data-main
who wishes to set their own base.
Prefix all bower module ids with a specific string
Default: undefined
Type: String
Alias one module name to another. Applied before prefix.
Default: {}
Type: Object
You need to already have a config.js file at the location specified by rjsConfig
. At a minimum, the file should look like this:
1requirejs.config({ 2 baseUrl: './', 3 paths: {} 4});
You still need to create a path for your js files. The grunt task will only create paths for third party libraries specified in bower.json
.
1requirejs.config({ 2 baseUrl: './', 3 paths: { 4 myComponent: 'js/myComponent.js' 5 } 6});
The task does not overwrite the config file, it just adds additional paths to it. So paths you add will be preserved. Keep in mind that if you change or remove one of your bower dependencies after you've run the task, that path will still exist in the config file and you'll need to manually remove it.
Although RequireJS does not provide a bower.json
file, a path to require.js
will still be created in your rjsConfig
file. The path's name will be requirejs
. If you are optimizing your scripts with r.js
you can use this path to make sure RequireJS is included in your bundle.
BSD license and copyright Google
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More