Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-npm-bower

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-npm-bower

Grunt plugin which helps migrating from Bower to npm.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

grunt-npm-bower

npm Travis CI Greenkeeper badge Styled with Prettier

Wire

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.

You can find the published source code at github.com/wireapp.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

Description

Grunt plugin which helps migrating from Bower to npm.

Installation

npm install --save-dev grunt-npm-bower
grunt.loadNpmTasks('grunt-npm-bower');

Workflow

Using grunt-npm-bower is as simple as this:

  1. Run bower-away command in the project you want to migrate (but don't delete your bower.json yet!).
  2. Run grunt-npm-bower task (from your Gruntfile.js)
  3. Finally, delete your bower.json (☠)

An exemplary task configuration:

Gruntfile.js

module.exports = grunt => {
  grunt.initConfig({
    npmBower: {
      options: {
        cleanTargetDir: true,
        targetDir: './lib',
        verbose: true,
      }
  });

  grunt.loadNpmTasks('grunt-npm-bower');
  grunt.registerTask('default', ['npmBower']);
};

Options

bowerConfig

  • Type: String
  • Default: bower.json

Location of your Bower configuration (relative to your project's root directory).

componentDir

  • Type: String
  • Default: node_modules

Location where your Bower components are installed. When using bower install this will be bower_components. If you are using npm install (or yarn), it's node_modules. If you are using a .bowerrc file, it might be something else.

npmConfig

  • Type: String
  • Default: package.json

Location of your npm configuration (relative to your project's root directory).

cleanTargetDir

  • Type: Boolean
  • Default: false

If setted to true, the specified targetDir will be removed before copying Bower components there.

overrideProp

  • Type: String
  • Default: exportsOverride

Key name that is being used for export overrides (if defined). Read more about exportsOverride in "Advanced usage".

resolveName

  • Type: Boolean
  • Default: true

If setted to true, the plugin tries to resolve the names of your dependencies from a bower.json, .bower.json or package.json file (in this order). If setted to false, it resolves the names from your package.json (Example: @bower_components/dexie).

Keywords

FAQs

Package last updated on 30 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc