https://github.com/jxmked/auto-min
Create minified mirror of your JS, CSS, HTML, JSON files.
https://github.com/jxmked/auto-min
cli css-minifier html-minifier js-minifier json-minifier minifier npm npm-package portfolio-include
Last synced: about 2 months ago
JSON representation
Create minified mirror of your JS, CSS, HTML, JSON files.
- Host: GitHub
- URL: https://github.com/jxmked/auto-min
- Owner: jxmked
- License: mit
- Created: 2022-08-29T19:38:04.000Z (almost 4 years ago)
- Default Branch: xio
- Last Pushed: 2022-09-22T12:09:15.000Z (almost 4 years ago)
- Last Synced: 2025-08-10T04:43:37.770Z (11 months ago)
- Topics: cli, css-minifier, html-minifier, js-minifier, json-minifier, minifier, npm, npm-package, portfolio-include
- Language: TypeScript
- Homepage:
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Automin
Create minified mirror of your JS, CSS, HTML, JSON files.
## The Creation
- [Migrating My Auto-Min NPM package From Javascript to Typescript Using Vim in Termux. No Audio.](https://youtu.be/8xP3pR-6vg0)
## Installation
With NPM: `npm install -g automin`
or
- `git clone https://github.com/jxmked/Auto-Min.git`
- `cd Auto-Min && npm install && npm link .`
## Command
| Flags | Description | Action |
| :---: | :---: | :---: |
| -h, --help | Print Help | Optional |
| -i, --input | Input Directory | Required |
| -o, --output | Output Directory | Required |
| --overwrite | Remove all files from output folder | Optional |
| --merge | Keep old files from outout folder and overwrite files that has been processed from input folder | optional |
> Note: --merge and --overwrite cannot be use at the same time
## Notes:
- Output folder will be overwritten and remove files that doesn't belong to original copies
- Install it globally
## Some Notes
Can work Offline after installation.
Easy To use, just `automin -i -o ` and wait until its done.
Using uglifyjs `nameCache` feature to preserve function names for next-file-use.
Files with file format of `.js .css, .html, .json` can be minified.
Other minifiers can be implemented easily by editing `./src/components/minifier.ts` file.
Except for files with `.min.` before extension.
Force skip for `.git` and `node_modules`
## Dependencies
- [UglifyJS](https://github.com/mishoo/UglifyJS)
- [HTML-minifier](https://github.com/kangax/html-minifier)
- [clean-css](https://github.com/clean-css/clean-css)
- [jsonminify](https://github.com/fkei/JSON.minify)
- [commander.js](https://github.com/tj/commander.js)
- [node-mkdirp](https://github.com/substack/node-mkdirp)
- [env-res](https://github.com/jxmked/NPM-Environment-Variables)
----
#### Written by Jovan De Guia
## Socials
- [Github](https://github.com/jxmked)
- [Facebook](https://www.facebook.com/deguia25)