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

web-combiner

v0.0.6

Published

Combine & inline & minify js/css/html for web pages, build single file app

Downloads

6

Readme

web-combiner

Combine, inline, minify tool for js/css/html

Install

Linux: install global, for windows please install Visual C++ 2010 Express, first.

sudo npm install web-combiner -g

useage

#true: minifiy css/js/html after inlined to one page.
inliner mob/mob-lite.html mob/mob-lite.min.html true

Develop

install locally

npm install web-combiner

node app:

var combiner = require("web-combiner")
  , inliner = combiner.inliner
  , combine = combiner.combine
  , combineEx = combiner.combineEx;

Combine

Combine files into one

Parameters

  • -in: input file path, it can be configuration file or dictionary;
  • -out: output file path;
  • -watch: keep watching the changes, if no parameter just combine once;

Sample: Combine directory

combine -in static/css  -out static/live/src.js -watch true

Sample: Combine file list

combine -in static/js/makefile.inc  -out static/live/src.js -watch true

CombineEx

Combine files from configuration

Sample: Configuration

#Configuration File

#Combine Directory, doesn't run combine at the first time
?in=static/css&out=static/live/dir.css&run=false

#Combine Javascript
?in=static/js&out=static/live/debug.js
  lib/a.js
  b.js
  c.js
#Minify the combined javascript
$java -jar tools/yuicompressor-2.4.7.jar static/live/debug.js -o static/live/debug.min.js

#Combine CSS, just combine at the first time, doens't watch change on it.
?in=static/css&out=static/live/debug.css&watch=0
#Minify the combined css
$java -jar tools/yuicompressor-2.4.7.jar static/live/debug.css -o static/live/debug.min.css
  site.css
  a.css
  b.css

Parameters:

In configuration file

  • ?: Parameter begin with "?"
  • $: Commands that execute after combined.
  • in: Input file path, it can be configuration file or dictionary;
  • out: output file path;
  • run: Running combine at the first time?
  • watch: Keep watching the changes?

Sample: CombineEx

combineEx -in static/MakeFile.cfg -watch true -run true

Parameters:

In command line, priority will be higher than parameters in configuration file

  • -in: Input file path, it can be configuration file or dictionary;
  • -run: Running combine at the first time?
  • -watch: Keep watching the changes?

Inliner

Make css/js inlined

Useage:

#debug mode just inlined
$ inliner mob/mob-lite.html mob/mob-lite.src.html
#release mode inlined and minified
$ inliner mob/mob-lite.html mob/mob-lite.min.html true