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

@decerto/make-war

v0.7.0

Published

CLI tool to make WAR with static content

Downloads

231

Readme

make-war

A CLI tool that make war package for the SPA app from static files. Generated war is capable to handle html5 routing.

Install

npm install --global @decerto/make-war

or

npm install --save-dev @decerto/make-war

Usage

$ make-war --help
Usage: make-war

  -c, --config=ARG                               use defaults value for name, version and description from given json file
  -o, --output=ARG                               output file (default is {name}-{version}.war)
  -i, --input-dir=ARG                            root directory from which the files are taken (default is dist)
  -d, --description=ARG                          application description
  -n, --name=ARG                                 application display name (default is SPA)
  -v, --version=ARG                              application version (default is 0.0.0-SNAPSHOT)
  -p, --pass-through=ARG+                        regexp to pass through
  -s, --content-security-policy=ARG              add Content-Security-Policy for index.html
  -S, --content-security-policy-report-only=ARG  add Content-Security-Policy-Report-Only for index.html
      --prevent-cache-for-index-html             add response headers that disable cache for index.html
  -H, --header=ARG+                              add response headers for index.html (-H X-My-Header:Content)
  -U, --urlrewritefilter-jar-url=ARG             specify custom location for urlrewritefilter jar (default is http://central.maven.org/maven2/org/tuckey/urlrewritefilter/4.0.3/urlrewritefilter-4.0.3.jar)
  -h, --help                                     display this help

with package.json

{
    "...": "...",
    "scripts":{
        "...": "...",
        "war": "make-war -n myApplication -d 'My single page application' -o myApp.war"
    }
}

Hint: You can add script called "postbuild": "npm run war"