Skip to content

Commit

Permalink
feat: optionally pull changes from remote
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Changes from remote are now pulled optionally
  • Loading branch information
medikoo committed Nov 12, 2018
1 parent f8813d9 commit d7a297b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Within [configuration](#configuration) you choose a folder (defaults to `~/npm-p

When running `npm-cross-link install <package-name>` command following steps are pursued:

1. If repository is not setup, it is cloned into corresponding folder. Otherwise changes from remote are pulled (can be opt out via `--no-pull`), and optionally committed changes can be pushed (indicate such intent with `--push`)
1. If repository is not setup, it is cloned into corresponding folder. Otherwise optionally changes from remote are pulled (`--pull`), and optionally committed changes can be pushed (`--push`)
2. All maintained project dependencies (also `devDependencies`) are installed according to same flow. Those not maintained (not found in `packagesMeta`) are npm linked to global npm folder, if supported at latest version, otherwise they're installed on spot (but in a form where all its dependencies persist in a dependency folder)
3. Package is ensured to be linked to global npm folder

Expand All @@ -38,7 +38,7 @@ _Note: This command doesn't interfere in any way with eventual project at curren

##### Supported options:

- `--no-pull` - By default (for all updated packages) mising updates are pulled from remote. This option turns that off
- `--pull` - Pull eventual new updates from remote
- `--push` - For all updated packages push eventually committed changes to remote

#### `npm-cross-link install [...options]`
Expand Down
2 changes: 1 addition & 1 deletion bin/npm-cross-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require("log4-nodejs")({ defaultNamespace: "npm-cross-link" });

const meta = require("../package");

const argv = require("minimist")(process.argv.slice(2), { boolean: ["push"] });
const argv = require("minimist")(process.argv.slice(2), { boolean: ["pull", "push"] });

const [command, packageName] = argv._;

Expand Down
4 changes: 2 additions & 2 deletions lib/private/cli/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ up to npm-cross-link installation rules
Options:
--no-pull Do not pull changes from remote
--pull Pull changes from remote
--push Push committed changes to remote
--help, -h Show this message
Expand All @@ -44,7 +44,7 @@ Ensures all packages in npm packages folder are properly installed and up to dat
Options:
--no-pull Do not pull changes from remote
--pull Pull changes from remote
--push Push committed changes to remote
--help, -h Show this message
Expand Down

0 comments on commit d7a297b

Please sign in to comment.