trucks v1.0.21
Trucks (CLI)
Web component compiler command line interface
Command line interface for the trucks-compiler libary.
Install
npm i -g trucksOr just for your project:
npm i trucks --save-devDocumentation
Use the --help or -h option for program help:
trucks -hIf the program is installed globally the man page will be installed:
man trucksUsage
To compile components pass HTML source files, for example:
trucks src/*.htmlWhich will generate components.css, components.js and components.html in the current working directory. Template elements in the source component files are compiled to javascript functions and prepended to components.js.
In this case the HTML templates are not compiled to javascript. Use this option when compiling polymer components.
Change the output directory with the --out option:
trucks src/*.html -o buildThe output file name is components by default; use the --name option to change the name of the generated files.
Configuration files can be loaded and merged with the default options using the --conf option:
trucks src/*.html -o build --conf options.jsSee OPTIONS for the options that may be specified in configuration files.
For full cli documentation see the man page and consult the trucks readme for information on creating components.
Completion
Completion is available for zsh. To install copy _trucks to a directory in $fpath, see the completion docs for more information.
Help
Usage: trucks [-fh] [--force] [--secure] [--print-imports] [--print-tree]
[--print-manifest] [--print-stack] [--help] [--version] [--out
<dir>] [--name <val>] [--html <file>] [--css <file>] [--js
<file>] [--transforms <id...>] [--protocols <id...>] [--rc
<file...>] [--extract <dir>] [--inject <dir>] [--manifest <file>]
[files...]
Compiles web components.
Options
-o, --out=[dir] Output directory (default: cwd)
-n, --name=[val] Name for output files (default: components)
-m, --html=[file] Template output file
-s, --css=[file] Stylesheet output file
-j, --js=[file] Javascript output file
-t, --transforms=[id...]
Run transform plugins
-p, --protocols=[id...] Enable protocol resolver plugins
-c, --rc=[file...] Configuration files to require
-e, --extract=[dir] Extract shadow styles to directory
-i, --inject=[dir] Inject shadow styles from directory
-a, --manifest=[file] Write manifest to file
-f, --force Force overwrite existing files
--secure Disable the http: protocol
--print-imports Print the file hierarchy
--print-tree Print the component tree hierarchy
--print-manifest Print the generated files manifest
--print-stack Print stack trace on error
-h, --help Display help and exit
--version Print the version and exit
trucks@1.0.15Developer
Install dependencies with npm i and install mkdoc globally (npm i -g mkdoc).
Build
To build all the command line interface files run:
mk cliTo see all available tasks run mk --tasks.
Readme
To build the readme file:
mk readmeTest
To run the test suite:
npm testTests are not included in the npm package you should clone the repository to run the test suite.
Cover
To generate code coverage run:
npm run coverLint
Run the source tree through jshint and jscs:
npm run lintClean
Remove generated files:
npm run cleanLicense
MIT
Created by mkdoc on August 6, 2016
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago