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

compile.js

v1.1.4

Published

A quick and easy way to watch, compile, and serve jade files.

Downloads

20

Readme

compile.js

A quick and easy way to watch, compile, and serve jade files.

compile.js [--help | --version | -g <name> [-r <repo>] | -d  [-i <infile>]
           [-o <outfile>] [-p <port>] [--pretty-print] | -c [-i <infile>]
           [-o <outfile>] | -w [-i <infile>] [-o <outfile>] | -s
           [-i <infile>] [-p <port>]]

Options:
  --generate, -g, --gen     generate a new project
  --repository, -r, --repo  specify template repository for new project
  --compile, -c, --comp     compile a jade file
  --watch, -w               watch and compile a jade file
  --serve, -s               serve input file
  --develop, -d, --dev      watch, compile, and serve a jade file
  --infile, -i, --in        the input jade file
  --outfile, -o, --out      the output html file
  --port, -p                port to serve outfile on
  --pretty-print, -P        pretty print output
  --help, -h                display help information
  --version, -v             display version information

Installation

Just run sudo npm install -g compile.js.

The command compile.js should automatically be added to your PATH.

Examples


Project Generation

compile.js -g new-project

This creates a new instance of 5paceManSpiff/spa-template under the new-project directory.


compile.js -g bloop -r https://github.com/5paceManSpiff/blip

This uses the -r flag to specify a project template repo to clone. In this case it clones 5paceManSpiff/blip to the bloop directory.


Project Development

compile.js -d

This serves index.html on port 8000. index.html is compiled from the default input index.jade every time a change in index.jade is detected.


compile.js -d -i input.jade -o output.html

This specifies the input file and output file with the -i and -o flags.


compile.js -d -p 8080

This specifies the port used to serve the output file.


compile.js -d -P

This pretty prints the output html file.


Jade Compilation

compile.js -c

This compiles index.jade to index.html.


compile.js -c -i input.jade -o output.html

This compiles input.jade to output.html.


File Serving

compile.js -s

This serves index.html on port 8000.


compile.js -s -i input.html -p 8080

This serves input.html on port 8080.


Watching Jade Files

compile.js -w

This compiles index.jade to index.html whenever changes are detected in index.jade.


compile.js -w -i input.jade -o output.html

This compiles input.jade to output.html whenever changes are detected in input.jade.


Project Templates

Any git repository can be used as a project template using the -r flag. The default is my spa-template repository. Its directory structure looks like this.

.
|-- LICENSE
|-- README.md
|-- assets
|   |-- main.js
|   `-- style.css
|-- index.jade
`-- package.json

Projects currently using compile.js

|project | src| |--------|-------| |blip | github| |whipped | github| |aaronlandis.io | github|