0.0.3 • Published 9 years ago
magento-frontend v0.0.3
magento-frontend
Magento 2 Minify all assets files in public path
Install
npm i -D magento-frontend
yarn add -D magento-frontendArgumnets
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