builder-support

Builder support libraries

Builder Support Tools

Support tools for authoring builderarchetypes.

Installation

To use the production and development workflows, install both this package and the development module:

$ npm install --save-dev builder-support

Usage

builder-support gen-dev

Use this tool to create an ARCHETYPE-devmodule for publishing alongside ARCHETYPEwith the same version numbers, details, etc.

This tools assumes an archetype structure of:

  • package.json- Dependencies needed for production tasks and scriptsentry that has tasks for both production and development. Must have name, descriptionfields.
  • A development sub-directory or independent repository containing dependencies for development tasks only.
    • dev/package.json
    • ../ARCHETYPE-dev/package.json

Assuming those exist, then the tool:

  • Modifies ARCHETYPE-dev/package.jsonas follows:

    • Copies the root package.json
    • Removes package.json:devDependencies
    • Replaces package.json:dependencieswith ARCHETYPE-dev/package.json:dependencies
    • Updates things like the namefield to represent ARCHETYPE-dev
  • Copies README.mdto ARCHETYPE-dev/README.md

  • Copies .gitignoreto ARCHETYPE-dev/.gitignore

This supports a workflow as follows:

$ vim HISTORY.md              # Version notes
$ vim package.json            # Bump version
$ builder-support gen-dev     # Generate `ARCHETYPE-dev` files
$ npm run builder:check       # Last check!
$ git add .
$ git commit -m "Version bump"
$ git tag -a "vNUMBER" -m "Version NUMBER"
$ git push && git push --tags
$ npm publish                 # Publish main project

# Publish dev project in same repo
$ cd dev && npm publish

# (OR) Publish dev project in different, parallel repo
$ cd ../ARCHETYPE-dev
$ git commit -m "Version bump"
$ git tag -a "vNUMBER" -m "Version NUMBER"
$ git push && git push --tags
$ npm publish                 # Publish dev project

If you are bootstrappinga new archetype you will need to ensure either that a ARCHETYPE/devor ../ARCHETYPE-devdirectory exists. The rest of the files when then be properly generated into the dev project.

And you should be good to run builder-support gen-devin the project root.

HomePage

https://github.com/FormidableLabs/builder-support

Repository

https://github.com/FormidableLabs/builder-support.git


上一篇:彻底理解cookie、session、localStorage、sessionStorage以及使用方法。
下一篇:builder-victory-component

相关推荐

官方社区

扫码加入 JavaScript 社区