Automate compression + Inline JS, CSS, HTML and Images for Static website.
Get Set Deploy! Generate production-ready code for Static websites
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.
npm install -g goalup-minify
goalup-minify [options]
/examples
directory to some foldergoalup-minify
inside /examples
./public
(default name) folder is generated with your minified resources, in the working directory.goalup-minify
anywhere, however, rem. that paths are relative to directory where this command is run.goalup-minify --help
to list all the options
Note: Paths in options are relative to working directory
/public
is default output directory.goalup-minify -o hello.js index.js world.css
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
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
--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
.
--exclude
option.--only
option.--dest
cannot be same as the working directory. [[CUZ THAT’S UNSAFE]]goalup-minify
as build tool).