Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vtex/grunt-defaults
Grunt config mixins
https://github.com/vtex/grunt-defaults
srv-checkout-ui xp-shopping
Last synced: about 1 month ago
JSON representation
Grunt config mixins
- Host: GitHub
- URL: https://github.com/vtex/grunt-defaults
- Owner: vtex
- License: mit
- Created: 2015-05-04T21:27:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-08T19:05:34.000Z (over 9 years ago)
- Last Synced: 2024-04-14T12:13:33.712Z (9 months ago)
- Topics: srv-checkout-ui, xp-shopping
- Language: CoffeeScript
- Size: 125 KB
- Stars: 2
- Watchers: 15
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grunt-defaults
A Grunt convention-over-configuration meta-project.
## Usage
Add `@vtex/grunt-defaults` as a dependency on your project:
npm i --save-dev @vtex/grunt-defaults
Each file in `configs/` exports a function that returns some piece of grunt configuration.
Use them to build the config object in your `Gruntfile`:
```
defaults = require '@vtex/grunt-defaults'
_ = require 'underscore'module.exports = (grunt) ->
pkg = grunt.file.readJSON 'package.json'config = _.extend(
defaults.webpack(pkg),
{
open:
options:
delay: 500
dev:
path: 'http://localhost:<%= connect.options.port %>/webpack-dev-server/'
}
)tasks =
default: ['open:dev', 'webpack-dev-server']grunt.config.init config
require('load-grunt-tasks')(grunt, {pattern: ['grunt-*']})
grunt.registerTask taskName, taskArray for taskName, taskArray of tasks```
## Contributing
Add a file to `configs/` that exports a function returning a grunt config object.
`index.coffee` auto-discovers new files.
------
VTEX - 2015