raptor-optimizer-cli

1.0.3-beta • Public • Published

RaptorJS Optimizer CLI

This utility provides support for running the RaptorJS Optimizer from the command-line.

Installation

npm install raptor-optimizer-cli --global

Usage

A simple usage that writes out a JavaScript bundle and a CSS bundle to the static/ directory that includes all of the required dependencies is shown below:

raptor-optimizer foo.js style.less --main main.js --name my-page

With additional options:

raptor-optimizer jquery.js style.less \
    --main main.js                         # Entry JavaScript module for the browser 
    --name my-page                         # Give the page bundle files a name 
    --out static                             # Output directory 
    --url-prefix http://mycdn/static/      # URL prefix 
    --fingerprint                             # Include fingerprints 
    --html                                 # Head and body HTML 
    --minify                               # Minify JavaScript and CSS 
    --inject-into index.html               # Inject HTML markup into a static HTML file 
    --plugin my-plugin                     # Enable a custom plugin 
    --transform my-transform                 # Enable a custom output transform 

Alternatively, you can create a JSON configuration file and use that instead:

raptor-optimizer --config optimizer-config.json

For additional help from the command line, you can run the following command:

raptor-optimizer --help

Readme

Keywords

none

Package Sidebar

Install

npm i raptor-optimizer-cli

Weekly Downloads

5

Version

1.0.3-beta

License

Apache License v2.0

Last publish

Collaborators

  • austinkelleher
  • dylanpiercey
  • mlrawlings
  • pnidem