npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

trucks

v1.0.21

Published

Web component compiler and package manager

Downloads

91

Readme

Trucks (CLI)

Web component compiler command line interface

Command line interface for the trucks-compiler libary.

Install

npm i -g trucks

Or just for your project:

npm i trucks --save-dev


Documentation

Use the --help or -h option for program help:

trucks -h

If the program is installed globally the man page will be installed:

man trucks

Usage

To compile components pass HTML source files, for example:

trucks src/*.html

Which 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 build

The 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.js

See 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

[email protected]

Developer

Install dependencies with npm i and install mkdoc globally (npm i -g mkdoc).

Build

To build all the command line interface files run:

mk cli

To see all available tasks run mk --tasks.

Readme

To build the readme file:

mk readme

Test

To run the test suite:

npm test

Tests 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 cover

Lint

Run the source tree through jshint and jscs:

npm run lint

Clean

Remove generated files:

npm run clean

License

MIT


Created by mkdoc on August 6, 2016