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

goalup-minify

v1.3.0

Published

goalup-minifier simplifies your work to uglify and compress JS, CSS, HTML and IMAGE files.

Downloads

71

Readme

What is goalup-minify?

This tool creates Production-ready code in just 1 command. It runs popular tools (gulp, etc.) underneath to compress JS, CSS, HTML and Images. Note: This is not a bundler. In a nutshell, files are individually processed and output to /public directory. goalup-minify is purposed for static websites if no bundler / build tool is integrated in your project. You can also inline your compressed assets in html by passing inline attribute to the link, img and script tags. Check Ongoing section for more details.

Installation:

npm install -g goalup-minify

Getting Started:

goalup-minify [options]
  • Example:
    1. Copy /examples directory to some folder
    2. Run goalup-minify inside /examples.
    3. /public(default name) folder is generated with your minified resources, in the working directory.
    4. Note: You can run goalup-minify anywhere, however, rem. that paths are relative to directory where this command is run.

Options:

goalup-minify --help to list all the options

Example Commands:

Note: Paths in options are relative to working directory

  1. Compress only the listed files. /public is default output directory.

goalup-minify -o hello.js index.js world.css

  1. Creates dist as output folder if doesn't exist. Compress all js_folder/**/**.js files present in the listed path.

goalup-minify --js ./js_folder -d ./dist

  1. Compress js files in the path and all **/**.+(css|scss|stylus) files . It ignores all the files in excluded list if present in the aforementioned paths.

goalup-minify --js ./js_folder --style -x .js_folder/touch_me_not.js .js_folder/touch_me_not.css

Note:

--watch option is used in development environment where compressing assets is not required. Therefore, it's not part of plan as of now. However, it can be added on request, to achieve completeness and avoid setup of any additional toolchains. This might be required if someone is serving assets from /public directory using local server and not /src.


Ongoing development:

  • To support --exclude option.
  • To support --only option.
  • Validate arguments. To not allowing multiple arguments for any option. Also, --dest cannot be same as the working directory. [[CUZ THAT'S UNSAFE]]
  • ~~Add font-icons support~~ (Read this!)

Further plans:

  • Parse .html files and add file name hashing for linked .js and .css files. (--hashing as option). This helps in browser caching
  • Allow configurations for htmlmin, uglifyJS, etc. By default standard and lenient rules are added, however, custom support can be added on request.
  • Can add lint rules for js and css on request.
  • Create a boilerplate for static websites using CLI. (Internally would use goalup-minify as build tool).

TODO

  • Support es6 for goalup lib for ease of development (Currently, not required as it's a V. simple tool) ;)