0.3.0 • Published 8 years ago

grunt-bower-freeze v0.3.0

Weekly downloads
3
License
-
Repository
github
Last release
8 years ago

grunt-bower-freeze

Lock the bower.json to exact versions

Getting Started

This plugin requires Grunt ~0.4.5

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, you may install this plugin with this command:

npm install grunt-bower-freeze --save-dev

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

grunt.loadNpmTasks('grunt-bower-freeze');

The "bowerfreeze" task

Overview

In your project's Gruntfile, add a section named bowerfreeze to the data object passed into grunt.initConfig().

grunt.initConfig({
    bowerfreeze: {
        freeze: {
            src: 'bower.json',
            dest: 'bower-frozen.json'
        }
    }
});

Options

options.cwd

Type: String Default value: './'

If set all src and dest paths will be set relative to cwd.

options.install

Type: boolean Default value: false

Install bower before freezing (only if options.update = false).

options.update

Type: boolean Default value: false

Update bower before freezing. Overrides options.install.

Usage Examples

Default Options

In this example, the default options are used to freeze the versions of the bower.json in the current working directory.

grunt.initConfig({
    bowerfreeze: {
        freeze: {
            src: 'bower.json',
            dest: 'bower-frozen.json'
        }
    }
});

Custom Options

In this example, the default options are used to freeze the versions of the bower.json in the specified cwd. Additionally, all bower dependencies are updated before freezing.

grunt.initConfig({
    bowerfreeze: {
        freeze: {
            options: {
                cwd: 'tmp/default/',
                update: true
            },
            src: 'bower.json',
            dest: 'bower-frozen.json'
        },
    }
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

See the CHANGELOG.

0.3.0

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago