Giter Site home page Giter Site logo

pack's Introduction

pack

A tool to sync local package.json files from a master one

Automatically configures a package.json file from another. This is allows you to keep a master copy of a package.json file and keep other package.json files in sync with it. This helps with keeping package.json files consistent accross multiple projects.

Setup

Include a .packrc file in the same directory as the package.json you want to sync. The file can be in JSON or INI format. See node-config for other ways to specify the config file.

.packrc

The .packrc file tells pack where to pull the master package.json file from. It can come from either a published npm module or a Github repository.

npm

Specify any npm modules in the npm registry:

{
    "npm": "npi"
}

Scoped modules also work:

{
    "npm": "@jasonmorganson/wp"
}

Github

Specify a Github repository:

{
    "github": "jasonmorganson/npi"
}

Github urls also work:

{
    "github": "https://github.com/jasonmorganson/npi"
}

Whitelist

You can also set a whitelist in the config file. An keys in the whitelist array will be merged from the master file. If a key is not in the whitelist it will not be included.

{
    "npm": "npi",
    "whitelist": [
        "ava",
        "babel"
    ]
}

| Default: ["scripts"]

Blacklist

You can also set a blacklist in the config file. An keys in the blacklist array will NOT be merged from the master file. This is applied only to the whitelisted keys, if a key is not in the whitelist then it will not be included at all.

{
    "npm": "npi",
    "blacklist": [
        "scripts"
    ]
}

| Default: |[ | "name", | "description", | "keywords", | "version", | "homepage", | "repository", | "bugs", | "bin", | "main", | "dist", | "directories", | "dependencies", | "devDependencies", | "peerDependencies" |]

Usage

npx @jasonmorganson/pack

This will update the package.json in the directory its run in with the properties from the master package.json file.

pack's People

Contributors

jasonmorganson avatar

Watchers

James Cloos avatar

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.