plantation v0.0.19
Plantation
plantation is a collection of cake tasks to simplify working on
projects using multiple transpilers, particularly coffeescript and YAML. It has strong opinions
about the tools you want to use.
Status
The project is currently under very fitful development, and may be subject to breaking rewrites at any time.
Installation
There are two ways to install plantation:
Install globally
You can install
plantationglobally:npm install -g plantationYou can then run
plantationin your shell to see the list of commands available.This option is not really recommended, it ties all your projects to the same version.
Install locally
You can install
plantationlocally on a per-project basis:npm install plantationYou can then run
node_module/.bin/plantationin your shell to see the list of commands available. Alternatively, you can create/modify aCakefileto contain:do require 'plantation'You can then run
cakein your shell to see the list of commands available.This will load the tasks from the local installation of
plantation. This allows you to lock your project on a specific version ofplantation, giving you a way to hide from breaking changes.
Usage
Run the commands below with the executable you installed.
info
Shows the configuration that
plantationwill run with. Configuration is typically inferred based on convention, but can be given explicitly (see API).The configuration shown will look something like:
Plantation options: directories: # the directories plantation will use current: <cwd> # the 'project directory' source: <cwd>/src # the directory in which plantation will look for source files to compile target: <cwd> # the directory in which plantation will write compiled files compilers: # the compilers plantation has registered coffee # the coffeescript compiler yaml # the YAML compilerbuild:compiler
Performs a build, either with all registered compilers or a specific compiler.
A build involves trying to compile every source file with every compiler (though typically the compiler will only agree to compile files with a specific file extension).
Running
plantation buildwill produce something like:coffee : src/lib/class.coffee > lib/class.js yaml : src/package.yml > package.jsonwatch:compiler
Starts watching all files in the source directory. When they change they will be built, either with the given compiler or with all registered compilers.
Running
plantation watch, then edittingsrc/package.ymlwill produce something like:yaml : src/package.yml > package.jsontest:watch
testruns all tests using mocha.test:watchprovides the--watchargument to mocha.chai.expectandsinonare available globally in the tests, and chai is configured to usesinon-chaiassertions.Default mocha configuration can be overidden by setting the
mochakey when configuring plantation.See the mocha homepage for more information about mocha.
bump:{major,minor,patch,pre}
Bumps a bit of the version and overwrites the version in
<source directory>/package.yml, then performs a build to updatepackage.json. Uses semver for manipulating versions.The output from
bump:minormight look like:bumping 0.2.3 -> 0.3.0 wrote src/package.yml yaml : src/package.yml > package.jsontag:{major,minor,patch,pre}
Performs a
bumpof the given bit, then commits the changed package file and tags the commit. The commit message, tag name, and tag message will all simply equal<new version>.The output from
tag:minormight look like:bumping 0.2.3 -> 0.3.0 wrote src/package.yml yaml : src/package.yml > package.json tagged 0.3.0publish:{major,minor,patch,pre}
Performs a
tagof the given bit, then pushes the newHEADtoorigin/master, pushes the new tag and publishes the new version to npm.The output from
publish:minormight look like:bumping 0.2.3 -> 0.3.0 wrote src/package.yml yaml : src/package.yml > package.json tagged 0.3.0 [git push output] abc123..def456 HEAD -> master * [new tag] 0.3.0 -> 0.3.0 published 0.3.0
API
See source.
4 years ago
8 years ago
8 years ago
10 years ago
10 years ago
10 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago