grunt-bundle-wrapper

0.0.2 • Public • Published

grunt-bundle-wrapper

Build status

Build Status: Linux

Install

Install with npm

npm install grunt-bundle-wrapper --save-dev

Tasks

bundle-check

Wrapper around the bundle check command.

Configuration

With the default options the

grunt bundle-check

is equivalent to

bundle check

bundle-install

Wrapper around the bundle install command.

Configuration

With the default options the

grunt bundle-install

is equivalent to

bundle install

Configuration

options.rubyExecutable

Type: String

Default value: ''

options.bundleExecutable

Type: String

Default value: 'bundle'

options.outputNameFailed

Type: String

Default value: ''

options.inputNameFiles

Type: String

Default value: ''

options.args

Type: Object

Default value: {}

All argument is same as the CLI counterpart. You can check them with the $ bundle help {check|install} command.

options.args.gemFile

Type: String

Default value: null

options.args.path

Type: String

Default value: null

options.args.retry

Type: Number

Default value: null

options.args.dryRun

Type: Boolean

Default value: false

options.args.noColor

Type: Boolean

Default value: false

options.args.verbose

Type: Boolean

Default value: false

options.args.system

Type: Boolean

Default value: false

options.args.without

Type: String

Default value: null

options.args.local

Type: Boolean

Default value: false

options.args.deployment

Type: Boolean

Default value: false

options.args.binStubs

Type: String|Boolean

Default value: null

options.args.standalone

Type: String|Boolean

Default value: null

options.args.trustPolicy

Type: String|Boolean

Default value: null

options.args.jobs

Type: Number

Default value: null

options.args.noCache

Type: Boolean

Default value: false

options.args.quiet

Type: Boolean

Default value: false

options.args.clean

Type: Boolean

Default value: false

options.args.fullIndex

Type: Boolean

Default value: false

options.args.noPrune

Type: Boolean

Default value: false

options.args.shebang

Type: String

Default value: null

files

For more information see the Grunt documentation Configuring tasks/files

Flags

You can modify the options.args by Flags

Flag dry-run

Override the value of the options.args.dryRun argument with true.

Flag no-color

Override the value of the options.args.noColor argument with true.

Flag verbose

Override the value of the options.args.verbose argument with true.

Flag system

Override the value of the options.args.system argument with true.

Flag local

Override the value of the options.args.local argument with true.

Flag deployment

Override the value of the options.args.deployment argument with true.

Flag no-cache

Override the value of the options.args.noCache argument with true.

Flag quiet

Override the value of the options.args.quiet argument with true.

Flag full-index

Override the value of the options.args.fullIndex argument with true.

Flag no-prune

Override the value of the options.args.noPrune argument with true.

Examples

Basic

require('jit-grunt')(
  grunt,
  // Mapping.
  {
    'bundle-check': 'grunt-bundle-wrapper',
    'bundle-install': 'grunt-bundle-wrapper'
  }
);
 
grunt.initConfig({
  'bundle-check': {
    'my-01': {
      files: {
        src: ['path/to/Gemfile']
      }
    }
  },
  'bundle-install': {
    'my-01': {
      files: {
        src: ['path/to/Gemfile']
      }
    }
  }
});
 
grunt.registerTask('bundle-check-install', [
  'bundle-check',
  'bundle-install'
]);
grunt bundle-check-install
echo 'is equivalent to'
bundle check
bundle install

Custom options

grunt.initConfig({
  'bundle-check': {
    options: {
      bundleExecutable: '/home/foo/.rvm/gems/ruby-2.1.3/bin/bundle',
      arguments: {
        verbose: true,
        noColor: true
      }
    },
    'my-01': {
      files: {
        src: ['path/to/Gemfile']
      }
    }
  }
});
grunt bundle-check
echo 'is equivalent to'
/home/foo/.rvm/gems/ruby-2.1.3/bin/bundle check --verbose --no-color

Arguments and flags

grunt.initConfig({
  'bundle-check': {
    'my-01': {
      files: {
        src: ['path/to/Gemfile']
      }
    }
  }
});
 
grunt.registerTask('my-bundle-check', [
  'bundle-check:my-01:verbose:no-color'
]);
grunt bundle-check:my-01:verbose:no-color
echo 'is equivalent to'
bundle check --verbose --no-color
echo 'is equivalent to'
grunt my-bundle-check

Piping

Poor man's piping.

The bundle-check collects the directory names where the check was failed instead of throw a fatal error. The bundle-install uses this array of directory names to run bundle install only where it is necessary.

grunt.initConfig({
  'bundle-check': {
    options: {
      outputNameFailed: 'bundleWrapper.output.check.failed'
    },
    'my-01': {
      files: {
        src: ['path/to/Gemfile']
      }
    }
  },
  'bundle-install': {
    options: {
      inputNameFiles: 'bundleWrapper.output.check.failed'
    },
    'check-fallback': {}
  }
});
 
grunt.registerTask('bundle-check-install', [
  'bundle-check',
  'bundle-install'
]);
grunt bundle-check-install

Author

Andor Dávid

Release History

  • v0.0.1 - 2015-05-25
    • First release.

License

Copyright (c) 2015 Andor Dávid, contributors.
Released under the GPL2 license


This file was generated by grunt-verb on May 26, 2015.

Package Sidebar

Install

npm i grunt-bundle-wrapper

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • sweetchuck