Socket
Socket
Sign inDemoInstall

bower-requirejs

Package Overview
Dependencies
237
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.8.1

bin/bower-requirejs.js

38

package.json
{
"name": "bower-requirejs",
"version": "0.1.0",
"version": "0.8.1",
"description": "Automagically wire-up installed Bower components into your RequireJS config",

@@ -16,4 +16,4 @@ "keywords": [

],
"homepage": "https://github.com/yeoman/grunt-bower-requirejs",
"bugs": "https://github.com/yeoman/grunt-bower-requirejs/issues",
"homepage": "https://github.com/yeoman/bower-requirejs",
"bugs": "https://github.com/yeoman/bower-requirejs/issues",
"license": "BSD",

@@ -32,6 +32,16 @@ "author": {

],
"main": "Gruntfile.js",
"contributors": [
{
"name": "Merrick Christensen",
"email": "merrick.christensen@gmail.com",
"url": "http://merrickchristensen.com"
}
],
"main": "lib",
"bin": {
"bower-requirejs": "bin/bower-requirejs.js"
},
"repository": {
"type": "git",
"url": "git://github.com/yeoman/grunt-bower-requirejs.git"
"url": "git://github.com/yeoman/bower-requirejs.git"
},

@@ -43,3 +53,10 @@ "scripts": {

"requirejs": "~2.1.5",
"slash": "~0.1.0"
"slash": "~0.1.0",
"nopt": "~2.1.2",
"lodash": "~1.3.1",
"chalk": "~0.2.1",
"glob": "~3.2.6",
"file-utils": "~0.1.2",
"sudo-block": "~0.2.1",
"update-notifier": "~0.1.7"
},

@@ -54,6 +71,8 @@ "devDependencies": {

"bower": "~1.x",
"durable-json-lint": "0.0.1"
"durable-json-lint": "0.0.1",
"mocha": "~1.12.1",
"grunt-simple-mocha": "~0.4.0",
"should": "~1.2.2"
},
"peerDependencies": {
"grunt": "~0.4.0",
"bower": "~1.x"

@@ -65,4 +84,5 @@ },

"files": [
"tasks/bower-requirejs.js"
"bin",
"lib"
]
}

@@ -1,2 +0,2 @@

# grunt-bower-requirejs [![Build Status](https://secure.travis-ci.org/yeoman/grunt-bower-requirejs.png?branch=master)](http://travis-ci.org/yeoman/grunt-bower-requirejs)
# bower-requirejs [![Build Status](https://secure.travis-ci.org/yeoman/bower-requirejs.png?branch=master)](http://travis-ci.org/yeoman/bower-requirejs)

@@ -6,71 +6,22 @@ Automagically wire-up installed Bower components into your RequireJS config

## Getting Started
## Install
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:
- Install with [npm](https://npmjs.org/package/grunt-bower-requirejs): `npm install --save bower-requirejs`
```shell
npm install grunt-bower-requirejs --save-dev
```
## Example usage
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-bower-requirejs');
```
./node_modules/.bin/bower-requirejs -c path/to/config -e underscore -e jquery
```
[grunt]: http://gruntjs.com
[Getting Started]: http://gruntjs.com/getting-started
## Options
## Example usage
```js
grunt.initConfig({
bower: {
target: {
rjsConfig: 'app/config.js'
}
}
});
grunt.loadNpmTasks('grunt-bower-requirejs');
grunt.registerTask('default', ['bower']);
```
-h, --help # Print options and usage'
-v, --version # Print the version number'
-c, --config # Path to your requirejs config file'
-e, --excludes # Name of a dependency to be excluded from the process'
-b, --baseurl # Path which all dependencies will be relative to'
```
## Documentation
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`
### rjsConfig
**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.
### Options
#### exclude
Default: `[]`
Type: `Array`
Specify components to be excluded from being added to the RequireJS config.
#### baseUrl
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.
## Things to remember

@@ -80,8 +31,8 @@

You need to already have a config.js file at the location specified by `rjsConfig`. At a minimum, the file should look like this:
You need to already have a `config.js` file at the location specified by the `--config` option. At a minimum, the file should look like this:
``` js
requirejs.config({
baseUrl: './',
paths: {}
baseUrl: './',
paths: {}
});

@@ -94,6 +45,6 @@ ```

requirejs.config({
baseUrl: './',
paths: {
myComponent: 'js/myComponent.js'
}
baseUrl: './',
paths: {
myComponent: 'js/myComponent.js'
}
});

@@ -100,0 +51,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc