项目作者: launchdeckio

项目描述 :
Build automation engine by launchdeck.io
高级语言: JavaScript
项目地址: git://github.com/launchdeckio/katapult.git
创建时间: 2016-08-29T13:59:45Z
项目社区:https://github.com/launchdeckio/katapult

开源协议:Other

下载


katapult

Build automation tool by launchdeck.io

Build Status
NPM Version

Install

  1. $ npm install -g katapult

Usage

  1. $ katapult --help
  2. katapult <command> [args]
  3. Commands:
  4. katapult.js runInstall Run the install commands
  5. katapult.js runBuild Run the build commands
  6. katapult.js purge Delete all files matching "purge" globs
  7. katapult.js clearCache Empty cached results from install/build
  8. katapult.js package "runInstall", "runBuild" and "purge" serially
  9. Options:
  10. --version Show version number [boolean]
  11. -b, --buildPath Build "root" directory [string]
  12. -w, --workspace Metadata storage path [string]
  13. -m, --maxCacheSize Max allowed cache size [string]
  14. -d, --disableCache Disable caching [boolean]
  15. -v, --verbose Extra chatty mode [count]
  16. -h, --help Show help [boolean]

.katapult.yml

You can automate installation, testing and build routines through the use of .katapult.yml files.
When packaging a build, katapult will recursively search the root directory for .katapult.yml files and run the directives they contain.

install

Allows the specification of one or more commands that are run before any of the build commands are run. install commands are run by traversing the build tree, starting at the root directory.
If any of the commands exits with a code other than 0, the deployment is cancelled.

After execution of the install commands in any directory, the build tree is rescanned - install commands may thus produce subfolders in turn containing .katapult.yml files which will be processed in a same way.

build

build commands are run by traversing the build tree, ending at the root directory.
If any of the commands exits with a code other than 0, the deployment is cancelled.

command caching

Commands can be specified using two different types of syntax: plain and simple

  1. - npm install

or using a more verbose (associative) syntax. The latter allows you to define additional options on a per-command basis, for example: command caching. Command caching can significantly increase build speeds.

  1. - cmd: npm install
  2. input: package.json
  3. output: node_modules

Katapult will use johnnycache and store the resulting files of the operation (in this case, the entire contents of node_modules after running npm install) to a .tar.gz archive in .katapult/cache.

purge

Allows the specification of one or more globs that will be used to delete unnecessary files; a blacklist, if you will. This allows you to, for example, remove the node_modules bloat after bundling a script with browserify.
It is also possible to define a “negating glob array” — meaning all globs start with !. Katapult will treat such an array as a whitelist and remove all other files in the directory.

Example .katapult.yml

  1. install:
  2. - cmd: composer install
  3. input: composer.lock
  4. output: vendor
  5. purge:
  6. - "!config"
  7. - "!vendor"
  8. - "!web"

.katapultignore

Directories that match any of the globs specified in a .katapultignore file will not be traversed in the process of scanning for .katapult.yml files. You can also configure globs globally by creating ~/.katapultignore_global:

  1. **/node_modules
  2. **/vendor

License

GNU AGPL v3 © sgtlambda

dependency Status
devDependency Status