magento-frontend
v0.0.2 magento magento 2 minify
magento-frontend
Magento 2 Minify all assets files in public path
Install
npm i -D magento-frontend
yarn add -D magento-frontend
Argumnets
basePath: type:String
themes: type: Array
options: type: Object
Options:
debug
: type Boolean, default false
uglify
: you uglify confing
autoprefixer
: you autoprefixer confing
csso
: you csso confing
Usage
Create js file in magento2 instal folder myfile.js
And insert this code :
let optimazer = require('magento-frontend');
optimazer(__dirname,[{
vendor:'Magento',
theme:'luma',
lang:'en_US'
},{
vendor:'Magento',
theme:'blank',
lang:'en_US'
}],{
debug:true,
uglify:{/*custom options*/},
autoprefixer:{/*custom options*/},
csso:{/*custom options*/}
});
Run
node ./myfile.js
npm i [email protected]
Metadata
- MIT
- Whatever
- https://github.com/retyui
- released 5/5/2017