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

mincerize

v0.0.3

Published

Set of scripts and development server based on Mincer

Downloads

8

Readme

mincerize

A set of scripts working together with Mincer, providing an easy way to compile and replace JS or CSS files based on an HTML file (or template) as well as a development server.

mincerize

Top level command

Usage: mincerize [options] [command]

Commands:

  html
     Parse and outputs the list of matching assets from an HTML file

  build
     Compiles and produces Mincer manifest from an HTML file

  serve
     Start an asset pipeline development server

  help [cmd]
     display help for [cmd]


Options:

  -h, --help  output usage information

mincerize-serve

A development server based on Mincer with file watching utility and livereload.

  • Automatically watch any file within one of Mincer's include paths
  • Integration with Bower (bower_components added as an include paths)
  • Livereload event when a file changes
  • Development friendly error, based on and inspired by Play framework.

Usage: mincerize-serve [options]

Options:

  -h, --help                output usage information
  -M, --mount <mountpoint>  Specify the mount point for the Asset Pipeline(default: assets)
  -p, --port <port>         Specify the port to listen on (default: 3000)
  -I, --include <path>      Adds the directory to the Mincer load path
  -i, --ignore <ignore>     Ignores the given string from assets to compile
  -w, --watch               Turn on watching of files in include paths to trigger a LiveReload event

Examples

Clone the repo locally and cd into the examples folder.

$ git clone
$ npm install
$ cd examples/mincer && bower install
$ mincerize serve

mincerize-html

This command takes an HTML file and returns a list of matching assets, JS or CSS file.

Usage: mincerize-html [options]

Options:

  -h, --help                output usage information
  -i, --ignore <ignore>     Ignore assets matching the provided pattern
  -f, --filename <filname>  Define the name of the input file
  --css                     Only output stylesheets
  --js                      Only output javascript

Example

$ mincerize html --filename ./examples/todo-backbone/index.html

mincerize-build

This command takes an HTML file, and:

  1. Figure out the assets
  2. Pass each asset through mincer, with --output option set (manifest generation)
  3. Replace each reference in input HTML to the new, revved, one
  4. Outputs the result to stdout

Usage: mincerize-build [options]

  Options:

    -h, --help                output usage information
    -d, --debug               Turn on debugging info
    -p, --prefix <prefix>     Extracts asset relative path based on this prefix
    -I, --include <path>      Adds the directory to the Mincer load path. Comma separated list of values
    -i, --ignore <ignore>     Ignores the given string from assets to compile (relative to input file). Comma separated list of values
    -o, --output <directory>  Build assets into the provided directory
    -f, --filename <filname>  Define the name of the input file
    -c, --compress            Turn on compression for JS / CSS (using uglify / csswring)
    -s, --sourcemap           Turn on sourcemap generation


Examples:

    $ mincer-build -I ./bower_components -I ./app/assets/ -o build -f index.html
    $ mincer-build --ignore googleapi -f index.html

Example

$ mincerize build -f examples/todo-backbone/index.html -I bower_components > new.html