GithubHelp home page GithubHelp logo

mbaer3000 / grunt-shrinkwrapsy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tdeekens/grunt-shrinkwrapsy

0.0 0.0 0.0 118 KB

A grunt plugin to create a npm-shrinkwrap.

License: MIT License

JavaScript 100.00%

grunt-shrinkwrapsy's Introduction

grunt-shrinkwrapsy

Grunt task for shrink wrapping your project's dependencies via npm shrinkwrap

NPM

Build Status Build Status Circle CI Dependency Status

Getting Started

This plugin requires Grunt ~0.4.2

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-shrinkwrapsy --save-dev

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

grunt.loadNpmTasks('grunt-shrinkwrapsy');

The "shrinkwrapsy" task

Overview

In your project's Gruntfile, the shrinkwrapsy task is available to use.

You can run grunt shrinkwrapsy standalone Or add it to an existing task: grunt.registerTask('test', ['clean', 'shrinkwrapsy']);

Options

The shrinkwrapsy-task currently has seven options.

{
  prune: true,
  afterHooks: [],
  beforeHooks: [],
  devDependencies: true,
  withoutDependencies: [],
  withoutDevDependencies: [],
  withoutPeerDependencies: []
}

prune

If set to true prune npm's dependencies before generating a shrinkwrap.

beforeHooks

A little array of shell commands which will be ran through shelljs before the any other operation is ran. Maybe useful for cleaning up some files or even removing some of npm's dependencies.

afterHooks

Kinda the same as beforeHooks only that it - wait for it - runs after all commands have finished running.

devDependencies

Another boolean-flag indicating if the shrinkwrap should include npm's development dependencies. It transforms into the --dev-flag.

withoutDependencies

An [] of dependencies names which shall be removed from the generated npm-shrinkwrap.json. Might sound a bit woozy but is applicable in cases you e.g. want to symlink forked repositories.

withoutDevDependencies

Same as the above only for the devDependencies of the npm-shrinkwrap.json.

withoutPeerDependencies

Again, same as the above only for the peerDependencies of the npm-shrinkwrap.json.

Release History

  • 0.0.1 - First release.
  • 0.0.2 - Adds support for removing dependencies.
  • 0.0.3 - Makes removing dependencies more failsave.
  • 0.1.0 - Release of first minor, proven stable.

grunt-shrinkwrapsy's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.