1.1.4 • Published 3 years ago

@ghnacker/subpackage v1.1.4

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Subpackage - Utility for managing NodeJS projects with sub-packages

Overview

Designed for use with NodeJS projects made up of multiple sub-projects.

Allows you run scripts defined in package.json across multiple sub-projects (e.g. run npm install and npm run build across multiple projects)

Supports npm or yarn (thanks to @mateuszluczak). Yarn is detected via the presence of a yarn.lock file.

Set up

npm install --save-dev @ghnacker/subpackage

To use subpackage commands, you will first need to add a subPackages entry to your parent project's package.json file:

{
    "name": "my-awesome-project",
    "version": "2.5.1",
    "subPackages": [
        "packages/sub-package-1",
        "packages/sub-package-2"
    ]
}

Running a command across all sub-packages

To use subpkg, add it to the start of scripts entries in your parent project's package.json file:

  "scripts": {
    "postinstall": "subpkg install",
    "build": "subpkg run build"
  }

With the configuration above in your parent project, you can type npm run build (or yarn run build) to build all sub-packages.

Related Projects

License

MIT

1.1.4

3 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago