1.1.5 • Published 2 years ago

@raja_rakoto/minificator v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ᗰIᑎIᖴIᑕᗩTOᖇ

forthebadge forthebadge forthebadge forthebadge forthebadge forthebadge

Grunt JSON Javascript Git Gitub NPM

Since version 1.1.x of minificator, there is no more "images, html, css, scripts" sub-directory in input or output, just copy them in the input directory so that minificator can minify all files

This animated image is only a demonstration of this package but some things have been changed, so I invite you to read the documentation carefully

📌 Description

Minification is the process of removing unnecessary elements and rewriting code to reduce file size. These are usually webpage resources, such as HTML, CSS, and JavaScript files or even Images. Reducing the size of web resources allows files to be transferred faster, which makes web pages load faster.

Minificator allows you to minify and compress multiple files automatically, this package is based on task runner grunt, currently minificator supports the following files:

  • Any Image file with extension .png .jpg .svg .gif
  • Any HTML file
  • Any CSS file
  • Any Javascript file

Here are the benefits of using Minificator:

  • You can use it on any project
  • Easy to use, all tasks are preconfigured, just type easy to remember commands to start minituarization
  • You no longer need to use a web application or other similar software
  • Minificator is isolated in a working folder of its own, which means if you use another gruntfile, it's not a problem

📌 Install & Update

Before using Minificator, please add this script command in your project's package.json file:

	"scripts": {
		"minificator-install": "npm i @raja_rakoto/minificator --save-dev",
		"minificator-init": "grunt --gruntfile node_modules/@raja_rakoto/minificator/minificator.js minificator-init",
		"minificator-update": "npm update @raja_rakoto/minificator && rm -r minificator && grunt --gruntfile node_modules/@raja_rakoto/minificator/minificator.js minificator-init",
		"minificator-start": "grunt --gruntfile minificator/gruntfile.js"
	}

You can install Minificator with NPM:

npm run minificator-install

If you already have Minificator in your project and just want to update it, run the following command:

npm run minificator-update

WARNING: All files contained in the "minificator" directory will be deleted after the update, so remember to make a backup before starting an update

📌 Init

After installation, you need to initialize Minificator in your project root directory to use it, run the command below:

npm run minificator-init

NOTE: You cannot initialize if the "minificator" directory is already present in your project, please delete it before starting the initialization

📌 Use

To test that minificator works correctly, run the following command:

npm run minificator-start

After initialization, you need to go to the newly generated minificator folder and type grunt in your console to see all executable commands

Just copy the files to be minified in the input directory for the input files... So all the minified files are in the output directory

Enjoy it 😉