kak
v0.0.2
Published
A command-line tool for Metalsmith
Downloads
4
Readme
Kak
A sh command-line tool for project initialization and plugin management in Metalsmith.
Quick Start
Run this in a fresh directory:
npm -g install kak nodemon http-server # install kak + the dependencies for the default kak script
kak init coffee # initializes a project with a build script written in coffeescript
kak # runs the kak script, which runs the serve script by default, which runs a watcher and a dev server
Then navigate to http://127.0.0.1:8000.
Usage
With no arguments, kak runs the kak script specified in package.json.
Commands
If a command is unknown, it's passed to npm run
. For example,kak watch
runs the watch script specified in package.json.
init [lang]
Initializes a npm module with a Metalsmith build.<lang>
script that reads from src and writes to dist. Four additional npm scripts are declared in package.json:
- build: runs the
build.<lang>
script - watch: runs the
build.<lang>
script every time a change is made - serve: runs the
build.<lang>
script and restarts a dev server every time a change is made - kak: runs the serve script
Metalsmith, metalsmith-loader, and metalsmith-branch are installed in every new project.
add
Adds one or more plugins to the project.
kak add permalinks layout githubuser/the-plugin
is equivalent to
npm install --save metalsmith-permalinks metalsmith-layout githubuser/metalsmith-the-plugin
remove
Removes one or more plugins from the project.
kak remove branch
is equivalent to
npm remove --save metalsmith-branch
list
Lists all installed plugins.