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-project-builder

v0.0.4

Published

Build your project automatically for production just using few commands

Downloads

30

Readme

Build your project for production

Build your project automatically for production just using few commands

Services Provided

  • JS Minification(Traversing through HTML)
  • JS Concatenation(Traversing through HTML)
  • JS Minification(Traversing through JS)
  • JS Concatenation(Traversing through JS)
  • CSS Minification
  • CSS Concatenation
  • CSS asset dependency injection
  • HTML Minification
  • Image Optimisation
  • Font File Optimisation

JS Minification & Concatenation(Traversing through HTML)

It builds 4 files

  • vendorHead (Vendor javaScript which should resolve before page load i.e. inside head tag)
  • appHead (app javaScript which should resolve before page load i.e. inside head tag)
  • vendorBody (Vendor javaScript which should resolve after page load i.e. inside body or after tag)
  • appBody (Vendor javaScript which should resolve after page load i.e. inside body or after tag)

Commands Options

node myTask.js

--search= Path of your parent directory where your HTML are present(It can automatically find sub-directory)

--option= jsMin (For JS Minification & Concatenation Traversing through HTML)

--public= path of your public directory

--output= Output folder path //public will be treated as output if not provided

--vendor= Vendor folder name (default values will be node_modules, bower_components)

--vendor= multiple Vendor folder can be provided

--version= version of your project

--mangle= Boolean (default true)

Note: output, vendor, version are optional

Sample command

node myTask.js --search=E:\hdd\akhilesh\dev\src\static\views --option=jsMin --public=E:\hdd\akhilesh\dev\src --output=E:\hdd\akhilesh\dev\src\tst --vendor=node_modules --vendor=bower_components --version=jc561 --mangle=true

output

  • appBodyindex_jc561.min.3.js //no. 3.. keep tracks order of script
  • vendorBodyindex_jc561.min.3.js

JS Minification & Concatenation(Traversing through JS)

It builds given output(default main.js)

Commands Options

node myTask.js

--ent= absolute path of your entry file

--option= requireMin (For JS Minification & Concatenation Traversing through JS)

--out= absolute path of your output file

--mangle= Decide whether mangling should done or not (default is true)

--clean= Decide whether output dir should cleaned or not (default is false)

Note: mangle, clean are optional

Sample command

node myTask.js --ent=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static\app.js --option=requireMin --out=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static\out.js --mangle=true --clean=false

output

  • app.js

CSS Minification / Concatenation / CSS asset dependency injection

All the dependencies of css(e.g. Font files, Images etc.) will be copied with updated references in production css file

It builds 4 files

  • vendor (Vendor style)
  • app (app style)

Commands Options

node myTask.js

--search= Path of your parent directory where your HTML are present(It can automatically find sub-directories) //preferably put public dir so some assets inconsistencies can also be removed

--option= cssMin (For css Minification & Concatenation)

--public= path of your public directory

--output= Output folder path //public will be treated as output if not provided

--vendor= Vendor folder name

--vendor= multiple Vendor folder can be provided (default values will be node_modules, bower_components, Bootstrap)

--version= version of your project

--showCssDepErr=boolean //Show the error of css dependencies conflicts(When assets mentioned in css are not available)

Note: output, vendor, version, showCssDepErr are optional

Sample command

node myTask.js --search=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static --option=cssMin --public=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo --output=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static --vendor=node_modules --vendor=bower_components --version=jc561

output

  • appCSSindex_jc561.min.3.css //no. 3.. keep tracks order of style
  • vendorCSSindex_jc561.min.3.css

HTML Minification

It builds Optimised HTML file in output/public/same folder

Commands Options

node myTask.js

--search= Path of your parent directory where your HTML are present(It can automatically find sub-directories)

--option= htmlMin (For HTML Minification)

--public= path of your public directory //Same file will be treated as output if none of public/output provided

--output= Output folder path //public will be treated as output if not provided

Note: public, output, are optional

Sample command

node myTask.js --search=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static\views --option=htmlMin

output

  • appBodyindex_jc561.min.3.css //no. 3.. keep tracks order of style
  • vendorBodyindex_jc561.min.3.css

Image optimisation

It builds Optimised images in output/public folder

Commands Options

node myTask.js

--search= Path of your parent directory where your images are present(It can automatically find sub-directories)

--option= imgMin (For Image optimisation)

--output= Output folder path //search will be treated as output if not provided and replace the destination

Note: public, output, are optional

Sample command

node myTask.js --search=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static --option=imgMin --output=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static\kkp

output

Images will be created in respective Directory format after optimisation

Font file optimisation

It builds Optimised Font file in output/public folder

Commands Options

node myTask.js

--search= Path of your parent directory where your font file are present(It can automatically find sub-directories)

--option= fontMin (For font file optimisation)

--output= Output folder path //search will be treated as output if not provided and replace the destination

Sample command

node myTask.js --search=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static --option=fontMin --output=E:\hdd\akhilesh\reqireGlp\iwoScr\iwo\static\kkp

output

font file will be created in respective Directory format after optimisation

Requirement

  • node/npm

If using npm

  • use command "runBuild" in place of "node myTask.js"

How to run

  • Go to directory
  • run the command 'npm i'
  • run corresponding command