Detalhes do pacote

northbrook

northbrookjs148MIT4.6.3

Manage your projects with the power of NPM

northbrook, lerna, monorepo, tooling

readme (leia-me)

Northbrook

Reproducible tooling & configuration

What is this all about?

Northbrook is a bridge between the Node Package Manager (NPM) and your terminal. Northbrook orchestrates plugins to help you manage your projects, including multi-package projects (monorepos). It does so with Reginn dynamically adding to the command line interface.

Leveraging NPM allows users to install plugins that setup or manage all parts of your applications lifecycle from scaffolding to releasing. Configured through a simple JavaScript file, you can npm install other configurations for reuse or extension across any project!

This is for me!

# with npm
npm install --save-dev northbrook
# with yarn
yarn add --dev northbrook

Have more questions than answers or want to help?

Join us on gitter !


Table of Contents

Additional Documentation


General Project Goals

  • Manage projects with ease, including multi-package repositories (monorepos)
  • Useful out of box with no configuration
  • Extensible and configurable via plugins
  • Highly reusable, and versionable, configurations (installed via NPM)
  • Well Documented

Documentation Goals

This is a passion project, and as such it's too easy to write documentation that assumes knowledge that perhaps only core contributors have. A real goal of the project is to make as many user's lives as easy as possible and documentation is paramount to that goal. Please, if you see something that isn't documented, isn't clear, or just plain sucks, open an issue! Let us know! Better yet, your contribution as a pull request would be graciously welcomed!

Community Goals

Building Community around a project is so important for the longevity of a project. We want to personally state that everyone is welcome here, and any misconduct will not be tolerated. Your contributions in the form of bug reports, pull requests, and feature requests are vital and I want to hear them all, don't be shy. :smile:

Please be mindful that this is an open-source project developed only on the free time of it's contributors. We want to help, but time is a precious thing, so please be understanding and sensitive to these types of circumstances.


Northbrook Command Line Options

Northbrook does not do very much out of the box other than orchestrate plugins, but it does have some configurable CLI flags that make using Northbrook just a bit easier.

--only, -o Execute plugins only in specific packages

# run northbrook exec only in packageA
northbrook --only packageA exec -- npm install

--config, -c Explicitly define where to look for a northbrook configuration file.

northbrook --config .config/northbrook.production.js

--debug, -d Turn on a debug mode, where Northbrook will print to the console more information about what it is doing to orchestrate your plugins. Useful to find out how Northbrook operates, and for debugging errors that may be occuring.


Northbrook Configuration

Northbrook introduces a single file to use to configure how Northbrook works, out of the box, if the defaults work for you, you shouldn't have to even touch a configuration file. If you need to tweak some things, add or configure new plugins, this is where that can be done. By default this configuration file should be named either northbrook.js or northbrook.ts if TypeScript is for you. Throughout the documentation these two files will used interchangably but rules or guidelines that apply to one apply to all Northbrook configurations.

// as a TypeScript interface
interface NorthbrookConfig {
  packages?: Array<string>;
  plugins?: Array<string | App | Command>;
}

By default, and if no packages are defined, just the project-level package will be used as the only package. Likely you will never need to use the field unless you plan to develop more than one package in a monorepo. If you are developing a monorepo see more documentation on packages for monorepos here.

By default, and if no plugins are defined, a set of default plugins will be imported and used from northbrook/plugins. The next section will go further in depth about plugins.

Plugins

Plugins are used to introduce new functionality to Northbrook, as a matter of fact, Northbrook does very little other than facilitate the creation and management of plugins. Plugins can introduce tools to transpile your source code, to help you get started with testing, build documentation, or anything that can be done with node.js. Some examples may be

  • Building with TypeScript / Babel / Buble
  • Testing with Mocha / Karma
  • Bundling with Rollup / Browserify / Webpack
  • Building documentation
  • Scaffolding new packages

As a general philosophy Northbrook likes to follow, it is encouraged that plugins should not introduce configuration into a northbrook.js that is already covered by other mechanisms. For instance, a plugin for Babel has no need to introduce a way to configure Babel plugins since there already exists a .babelrc to do just that. The same goes for a plugin for TypeScript as tsconfig.json already exists to configure how to build your projects. This is especially important when it come to editor integrations that already exist using these files, no need to duplicate work!

Configuring plugins should look like this

// northbrook.js

const typescriptPlugin = require('some-typescript-plugin');

module.exports = {
  plugins: [
    'northbrook/plugins', // leave it to northbrook to do the require()ing
    typescriptPlugin, // a plugin can be user-required
    'tslint'
  ]
}
// northbrook.ts
export = {
  plugins: [
    'northbrook/plugins',
    'typescript',
    'tslint'
  ]
}

Plugins can either be a require()-able string or in the form of a Reginn App or Command.

By default northbrook/plugins will be used if no configuration is applied. For information about the default plugins or creating plugins please see PLUGINS.md.


Additional Features for Monorepos

The design of Northbrook is agnostic to the number of packages that you need to manage. This means, that you can just as easily use it to manage a single package or a monorepo with 100+ packages and share the same benefits.

Single installation of dependencies

Northbrook has been designed to allow plugins to move your devDependencies to the top-level. Allowing for a dependency like TypeScript to be installed 1 time and used for all managed packages. This could help cut the build time for your projects to focus on the important stuff, tests!

Benefits:

  • All packages use the same version of a given dependency
  • Dependency installation time is reduced
  • Less storage is needed

Single configuration

Just like dependencies, configurations are now allowed to exist at the top-level to only be configured once when it makes sense. Configurations such as a tsconfig.json can be declared once at the root level, and reused across all of your package. These leads to less duplication and configuration.


Packages for monorepos

When developing a monorepo, you will need to interact with a northbrook.js configuration file to setup where to look for each packages. Each package is to be defined as a relative path to it.

//northbrook.js
// commonjs
module.exports = {
  packages: ['relative/path/to/packageA', 'relative/path/to/packageB']
}

Additionally, if you have many packages co-located in a specific folder, it is possible to use a short-hand syntax /** to automatically find all packages in a directory.

module.exports = {
  packages: ['relativePath/**']
}

It is important to note that this syntax is not recursive and will only look for packages at the top-level of the relative path.

changelog (log de mudanças)

4.6.3 (2017-01-30)


Bug Fixes

  • fix(each): some plugins can reject with void 8856e0e7

4.6.2 (2017-01-30)


Bug Fixes

4.6.1 (2017-01-30)


Bug Fixes

  • fix(package): update dependencies 1c9bdeaf

4.6.0 (2017-01-23)


Features

  • feat(northbrook): show version number during release 5c5bc16f

Bug Fixes

  • fix(changedPackages): conditionally split affects string bf066986

4.5.5 (2017-01-23)


Bug Fixes

  • fix(northbrook): fix for releasing 726cf9d1

4.5.4 (2017-01-23)


Bug Fixes

  • fix(changedPackages): fix for the affects field 5bcddf03

4.5.3 (2017-01-22)


Bug Fixes

  • fix(parseCommitMessage): hotfix for commit parsing 73e8a035

4.5.2 (2017-01-21)


Bug Fixes

  • fix(northbrook): only display northbrook config warning in debug mode 2b0620be
  • fix(changedPackages): allow getting changed packages without previous git tag a4770de0
  • fix(commit): only ask questions if there are changes staged 93f19f19

4.5.1 (2017-01-16)


Bug Fixes

  • fix(commit): Use neither/nor (#87) 1e935b5e

4.5.0 (2017-01-16)


Features

  • feat(northbrook): build a dependency graph for more correct tooling c2ed7e3a

4.4.6 (2017-01-16)


Bug Fixes

  • fix(resolvePlugins): make debug conditional again 063082cc

4.4.5 (2017-01-16)


Bug Fixes

  • fix(resolvePlugins): remove console.log 00ce5408

4.4.4 (2017-01-16)


Bug Fixes

  • fix(npmLogin): allow retrying NPM login 7b1d8db3

4.4.3 (2017-01-16)


Bug Fixes

  • fix(northbrook): solve weird require() issues e9545430

4.4.2 (2017-01-16)


Bug Fixes

  • fix(errors): attempt to handle error messages more clearly 62f55010
  • fix(changedPackages): ensure no failures occur with poorly formatted commit messages 65e7883d
  • fix(link): clean up destination before linking 4e16ba3d

4.4.1 (2017-01-14)


Bug Fixes

  • fix(link): fix mutation issues 1baa80cf

4.4.0 (2017-01-13)


Features

  • feat(northbrook): load @northbrook/ and northbrook- prefixed plugins by default 1964268d

4.3.7 (2017-01-13)


Bug Fixes

  • fix(each): attempt to print error messages and exit on 1 2db07c04
  • fix(changedPackages): do not use release commits df73ce88

4.3.6 (2017-01-11)


Bug Fixes

  • fix(run): fix regex for windows 100bf889

4.3.5 (2017-01-05)


Bug Fixes

  • fix(resolvePlugins): fix failing tests with newer versions of dependencies 7247acf2

4.3.4 (2017-01-04)


Bug Fixes

  • fix(release): associate git tags to commit hashes e622423e

4.3.3 (2017-01-03)


Bug Fixes

  • fix(release): log when pushing to release branch 2172aa8b

4.3.2 (2017-01-03)


Bug Fixes

  • fix(release): small wording changes 47aa949c

4.3.1 (2017-01-03)


Bug Fixes

  • fix(release): provide sequential releases for reliability d6a4f0e7

4.3.0 (2017-01-03)


Features

  • feat(northbrook): add global changed flag and implementation for each fe687903

Bug Fixes

  • fix(northbrook): fix displaying northbrook flags in --help menu a9cf2495

4.2.3 (2016-12-31)


Bug Fixes

  • fix(changedPackages): fix for parsing merge commits 9e40651a

4.2.2 (2016-12-31)


Bug Fixes

  • fix(release): skip ci on changelog generation commit 0164fd49

4.2.1 (2016-12-31)


Bug Fixes

  • fix(release): watch pacman eat d2d01c44

4.2.0 (2016-12-31)


Features

  • feat(release): allow skipping tests 8b5d5ace

4.1.10 (2016-12-31)


Bug Fixes

  • fix(exec): exit on exec failures 488567ca

4.1.9 (2016-12-30)


Bug Fixes

  • fix(northbrook): commit execute fixes e5d02189

4.1.8 (2016-12-30)


Bug Fixes

  • fix(execute): reject promise when child process exits with non-zero 90613f53

4.1.7 (2016-12-30)


Bug Fixes

  • fix(northbrook): exit with code 1 on errors with each callback 98144b7f

4.1.6 (2016-12-28)


Bug Fixes

  • fix(exec): exit with code 1 on errors 5ba26344

4.1.5 (2016-12-24)


Bug Fixes

  • fix(northbrook): use app so that flags are inherited correctly 1b3c313f

4.1.4 (2016-12-23)


Bug Fixes

  • fix(package): depend on types directly so users do not have to 0040260d

4.1.3 (2016-12-23)


Bug Fixes

  • fix(release): use bugs url to generate links 81a1ab1a

4.1.2 (2016-12-23)


Bug Fixes

  • fix(release): fix changelog generation fc281f8e
  • fix(release): do not run tests in silent mode 0c69fdc4

4.1.1 (2016-12-23)


Bug Fixes

  • fix(release): create correct git tag for scoped packages 580931f6

4.1.0 (2016-12-22)


Features

  • feat(helpers): extract and export packagesToExecute e8e6fa42
  • feat(types): add Pkg type to exported types edc13275

4.0.4 (2016-12-22)


Bug Fixes

  • fix(northbrook): correctly resolve already required plugins f1c7e6bf

4.0.3 (2016-12-22)


Bug Fixes

  • fix(northbrook): fix for displaying flags 44a4a30c

4.0.2 (2016-12-22)


Bug Fixes

  • fix(release): improve logging 886312bb
  • fix(release): use standard git message type 42d2106e

4.0.1 (2016-12-22)


Bug Fixes

  • fix(release): allow using comver for release --check 19e623a0
  • fix(release): include package.json in commits d75fa2e3

4.0.0 (2016-12-22)


Breaking Changes

  1. northbrook.json is now northbrook.js or northbrook.ts. packages and plugins are the only config options left.
    • feat(northbrook): from-scratch reimplementation e8f3657a

Features

  • feat(northbrook): include northbrook folder 482db740
  • feat(northbrook): make check output prettier 60642576
  • feat(release): format release header dedac289
  • feat(release): allow usage of comver and semver 18e692b6

Bug Fixes

  • fix(commit): remove unneeded checkForStagedCommits 7a78b0ea

3.2.1-northbrook (2016-09-21)

Bug Fixes

  • northbrook: fix exec plugin (a5cf5fc)

3.2.0-northbrook (2016-09-21)

Features

  • northbrook: add option to exclude packages from exec (8dd2d72)

3.1.3-northbrook (2016-09-21)

Bug Fixes

  • northbrook: real fixes for symlink behavior (bcb3477)

3.1.2-northbrook (2016-09-21)

Bug Fixes

  • northbrook: fix linking scoped packages (aa32750)

3.1.1-northbrook (2016-09-21)

Bug Fixes

  • northbrook: fix for linking packages (e2fe103)

3.1.0-northbrook (2016-09-04)

Bug Fixes

  • northbrook: extend defaults rather than replacing them (a6a2bbb)
  • northbrook: use deepmerge to properly extend configurations (99585df)

Features

  • northbrook: add NORTHBROOK_EXEC_DIR to env for exec scripts to use (c7ea34f)
  • northbrook: allow extending multiple confiurations and additional options to methods (83fe26d)

3.0.7-northbrook (2016-09-04)

Bug Fixes

  • northbrook: make exec entirely synchronous (f548469)

3.0.6-northbrook (2016-09-04)

Bug Fixes

  • northbrook: fix post-install script (dff1632)

3.0.5-northbrook (2016-09-04)

Bug Fixes

  • northbrook: move postinstall script to plain es5 (a9f4dba)
  • northbrook: only run post-install script on postinstall when not on travis-ci (06f41d7)
  • northbrook: remove export statement (e62e207)

3.0.4-northbrook (2016-09-04)

Bug Fixes

  • northbrook: run fixpack on package.json (a859d6a)

3.0.3-northbrook (2016-09-04)

Bug Fixes

  • northbrook: json-beautify is a dep not devdep (b7ddc50)

3.0.2-northbrook (2016-09-04)

Bug Fixes

  • northbrook: move .babelrc to test folder as it's the only place needed (8c10c56)

3.0.1-northbrook (2016-09-03)

Bug Fixes

  • northbrook: ensure buba is installed for build step in postinstall (2577ac3)

3.0.0-northbrook (2016-09-03)

Features

  • northbrook: add utility functions to modify configuration files (5f51da3)
  • northbrook: remove \nb init\\ in favor of post-install script (6f922d3)

BREAKING CHANGES

  • northbrook: removes \nortbrook init\\

2.5.0-northbrook (2016-09-02)

Bug Fixes

  • northbrook: actually fix commit message errors [skip ci] (3107368)
  • northbrook: fix invalid commit message errors with validate-commit-msg (5f1153b)
  • northbrook: fix login input (95bf9b8)
  • northbrook: improve output of release commands (3c589da)
  • northbrook: should always create a git tag (c769381)
  • northbrook: use correct execute command (1b0adb7)

Features

  • northbrook: add option to skip git commands (2752de2)
  • northbrook: refactor util into smaller files and export from external api (c985035)

2.4.0-northbrook (2016-08-31)

Bug Fixes

  • northbrook: adjust templates to new information (31e8f6d)
  • northbrook: allow executing commmands that require input (fad0c87)
  • northbrook: always assign packages (c26d42e)
  • northbrook: build lib to run tests (873e5f0)
  • northbrook: fix styling of separator output (d4b66f4)
  • northbrook: git will usually log to stdout (0aff15e)
  • northbrook: only show new stuff in check mode (bd23089)
  • northbrook: provide backwards compatible exec method (e33ae9f)
  • northbrook: share the stdin/stdout in exec (909df8c)
  • northbrook: should not show loader during interactive prompts (3f25afe)
  • northbrook: use backwards compatible exec method (951e3a2)
  • northbrook: use new exec command correctly (ee73508)
  • northbrook: use working directory when no packages are defined (49d43e0)

Features

  • northbrook: add --skip-login option (cd36e37)
  • northbrook: add colors to separator (19527c6)
  • northbrook: add core command run (af51271)
  • northbrook: add run to default plugins (2b92cee)
  • northbrook: colorize release output (9f47894)
  • northbrook: print changelog in check mode [skip ci] (b0efa08)

2.3.0-northbrook (2016-08-31)

Features

  • northbrook: add the ability to extend configurations (e328c63)

2.2.7-northbrook (2016-08-26)

Bug Fixes

  • northbrook: fix commit tests (8faff27)

2.2.6-northbrook (2016-08-26)

Bug Fixes

2.2.5-northbrook (2016-08-26)

Bug Fixes

2.2.4-northbrook (2016-08-26)

Bug Fixes

  • northbrook: fix deployment script (6d79527)
  • northbrook: single quotes are not supported by bash (90d32ea)

2.2.3-northbrook (2016-08-25)

Bug Fixes

  • northbrook: github hostname for origin typo fix (#30) (976153e)

2.2.2-northbrook (2016-08-25)

Bug Fixes

  • northbrook: remove unneeded console.log (0cf0a18)

2.2.1-northbrook (2016-08-25)

Bug Fixes

  • northbrook: move deploy script to user travis ci env vars (2932b91)

2.2.0-northbrook (2016-08-25)

Features

  • northbrook: add --skip-npm option to release (ea5008c)

2.1.2-northbrook (2016-08-25)

Bug Fixes

  • northbrook: delete unneeded console.log()s (2adf32d)

2.1.1-northbrook (2016-08-25)

Bug Fixes

  • northbrook: fix commit and release for scoped packages (3f86390)

2.1.0-northbrook (2016-08-25)

Bug Fixes

  • northbrook: ensure releases happen in proper directory and are synchronous (10fb42d)

Features

2.0.20 (2016-08-25)

Bug Fixes

  • northbrook: fix commit msgs for monorepos (e3f4475)

2.0.19 (2016-08-24)

Bug Fixes

  • northbrook: fix github tags for monorepos (#24) (40d7c37)

2.0.18 (2016-08-24)

Bug Fixes

  • northbrook: add [skip ci] to all commits (781a745)
  • northbrook: fix process.stdout errors (857e445)

2.0.17 (2016-08-24)

Bug Fixes

  • northbrook: execute commands inside of package directory (#23) (31f0c8e)

2.0.16 (2016-08-24)

Bug Fixes

  • northbrook: fix publishing to npm (b20b7d7)
  • northbrook: fix publishing to npm (9dbb34c)
  • northbrook: fix publishing to npm (a6a33c3)
  • northbrook: publishing failed (462840e)

2.0.15 (2016-08-24)

Bug Fixes

  • northbrook: turn back on auto-deployment (379a738)

2.0.14 (2016-08-24)

Bug Fixes

  • northbrook: resolve promise when changelog is finished writing (6a99747)

2.0.13 (2016-08-24)

Bug Fixes

  • northbrook: end write stream after generation (4e43990)

2.0.12 (2016-08-24)

Bug Fixes

  • northbrook: add space between generated output (b09fbe4)
  • northbrook: better styling for output (b9ce198)
  • northbrook: changelog options did not have all information it needed at creation (dc02141)
  • northbrook: create write stream on generation (849eec4)
  • northbrook: dont create file stream before checking directory (185f396)
  • northbrook: fix type in commit output (43c2773)
  • northbrook: publish seems to hang even when run successfully (dc875eb)
  • northbrook: write to stdout when in check mode (d93978e)

2.0.11 (2016-08-24)

Bug Fixes

  • northbrook: improve output to user (d6a1ad5)

2.0.10 (2016-08-24)

Bug Fixes

  • northbrook: continue instead of return since using for-loop directly (d61edfe)
  • northbrook: do not publish unless EVERYTHING else has gone perfectly (209f374)
  • northbrook: go through commits in reverse (1a6227c)
  • northbrook: log error if it occurs (8372574)
  • northbrook: wrap generateChangelog in a Promise to ensure it is generated when further commands (9a9f1e9)

2.0.9 (2016-08-24)

Bug Fixes

  • northbrook: ensure lib/ is built before publishing to npm (928a7c7)
  • northbrook: switch to releaseBranch before doing anything (0627114)

2.0.8 (2016-08-24)

Bug Fixes

  • northbrook: fix error when no northbrook.json can be found (f6b0a87)
  • northbrook: only generate changelog all is well (33fd7ef)
  • northbrook: use getConfig exported from public api (853869b)

2.0.7 (2016-08-23)

Bug Fixes

  • northbrook: fix changelog generation (be9a7d3)
  • northbrook: fix git commands (1a39f84)
  • northbrook: remove greenkeeper-postpublish (a586f9f)

2.0.3 (2016-08-23)

Bug Fixes

  • northbrook: checkout in deployment (33f89d0)
  • northbrook: do not use execute helper (4eacbec)
  • northbrook: don't run in check mode if directory is unclean (9e60b67)
  • northbrook: fix deploy script (6256832)
  • northbrook: fix execution order (762d1fa)
  • northbrook: fix for deployment (20f4820)

2.0.1 (2016-08-23)

Bug Fixes

  • northbrook: fix commiting new changelog (ac97868)
  • northbrook: fix deployment script typo (a2bbfb3)
  • northbrook: fix release issues (#14) (de987ed)

Features

  • northbrook: Rewrite to be unit testable (#12) (9a6b10e)

BREAKING CHANGES

  • northbrook: Removes \version\\ from northbrook.json

ISSUES CLOSED: #8 #10

  • chore(northbrook): remove version from northbrook.json

  • chore(northbrook): fix dependencies to match v2.0.0

  • chore(northbrook): add conventional-commit-type to dependencies

  • chore(northbrook): mv commit-types to dependencies

Place commit types in proper location

  • chore(northbrook): attempt to configure auto-deployment when pushed to master

1.2.0 (2016-08-20)

Features

  • northbrook: remove changelog generation (3f0bf3a)

1.1.2 (2016-08-20)

Bug Fixes

  • northbrook: fix changelog generation (7f39768)

1.1.1 (2016-08-20)

Bug Fixes

  • northbrook: fix error when config is not defined yet (e3c1370)
  • northbrook: fix order of release tasks (2629850)

1.1.0 (2016-08-20)

Features

  • northbrook: allow glob matching packages, and not prefixing with 'northbrook' for plugins (a8315c2)

1.0.5 (2016-08-20)

Bug Fixes

  • northbrook: better plugin resolution (52a580a)

1.0.4 (2016-08-20)

Bug Fixes

  • northbrook: improve plugin resolution and make releasing safer (ce9af28)

1.0.3 (2016-08-19)

Bug Fixes

  • northbrook: fix incorrect wording (6ec2b95)
  • northbrook: fix resolving of local plugins (5b00aa9)

1.0.0 (2016-08-19)

Bug Fixes

  • release: fix some edge cases around releasing (f384d1c)

0.0.2 (2016-08-19)

Bug Fixes

  • init: add empty .npmignore (4a311d7)

0.0.1 (2016-08-19)