Giter VIP home page Giter VIP logo

submodules-install's Introduction

submodules-install - NPM Submodules Installer

This module provides a system for calling npm i, yarn install, or a custom command on a list of locations, ultimately providing automatic submodule installation.

Usage

Install via npm:

npm i submodules-install --save

Or Yarn:

yarn add submodules-install

Add an array of strings using glob syntax or specially formatted objects to your package.json:

"submodules": [
  "my_subdir/*",
  "my_subdir2/**",
  {
    "path": "my_subdir3",
    "cmd": "go",
    "args": ["build"]
  }
]

Then run:

npx submodules-install

Alternatively, you may also use preinstall, postinstall, or otherwise:

"scripts": {
  "preinstall": "submodules-install"
}

Submodules Object

If an object is provided to the submodules array, it should match the following structure:

{
  path: String,     // Target glob to search.
  cmd: String,      // Optional. Command to use to run the install. Defaults to npm or yarn if a `yarn.lock` file is found.
  args: [String],   // Optional. Arguments to pass to the command. Defaults to `i` under npm or `install` under yarn.
  contains: String, // Optional. File to find in the glob result directory. Defaults to `package.json` if using npm or yarn.
}

submodules-install's People

Contributors

kettek avatar liampublic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

submodules-install's Issues

Feature: Install submodules' packages with yarn

I faced some issues when install packages inside the submodules by running yarn, the submodule packages will install by npm. Is there any other way, can install packages by yarn ?

  • detect the lockfiles in the submodules to determine which packages manager to use
  • use the current running package manager to install package in submodule
  • default to use npm

Please publish the latest version

It looks like you forgot to publish the latest version to npm. The version available on npm is 1.0.2 whereas the one here is 1.1.0.

Thanks!

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.