Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/erikras/grunt-dir2module

Creates a single browserify/commonjs module that includes all files in a directory.
https://github.com/erikras/grunt-dir2module

Last synced: about 1 month ago
JSON representation

Creates a single browserify/commonjs module that includes all files in a directory.

Awesome Lists containing this project

README

        

# grunt-dir2module v0.0.2

> Creates a browserify/commonjs module with a map of all the files in a directory.

## Getting Started
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-dir2module --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-dir2module');
```

## Dir2Module task
_Run this task with the `grunt dir2module` command._

Task targets, files and options may be specified according to the Grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

### Examples

```js
// Project configuration.
grunt.initConfig({
dir2module: {
options: {
files: {
'dist/basic.js': ['src/services/*.js']
}
},
},
});
```

---

Task submitted by [Erik Rasmussen](http://erikras.com/)