Comments (3)
Add javascript function and push files with match your expression if you want. pass those values to your minify module and its works but normally on internet there will be an order for your file to be compiled, which only setup manually, so i recommend setting those manually or you will get more headache.
function getFiles(dir){
var files = fs.readdirSync(dir);
for(var i in files){
if (!files.hasOwnProperty(i)) continue;
var name = dir+'/'+files[i];
if (fs.statSync(name).isDirectory()){
getFiles(name);
}else{
console.log(name)
}
}
}
from node-minify.
That's what I do, but it would be nice to have such a feature in node minify
from node-minify.
It's live in 0.9.1 !
You can npm update node-minify
And the example :
new compressor.minify({
type: 'gcc',
fileIn: 'public/**/*.js',
fileOut: 'public/js-dist/wildcards-match-gcc.js',
callback: function(err, min){
console.log('wildcards match GCC');
console.log(err);
// console.log(min);
}
});
from node-minify.
Related Issues (20)
- CLI node-minify --option : json error HOT 1
- glob not working with cli HOT 2
- Error: ENOENT: no such file or directory HOT 3
- Update mkdirp to resolve minimist vulnerability HOT 1
- glob exclude not work HOT 1
- parse error on let = HOT 1
- Directory matching *.html in wildcard path causes uncaught error. HOT 1
- High severity security vulnerability in dependencies
- Document website cannot be visited HOT 1
- [Version 6.1.0] Error when running CLI HOT 1
- Command line error using 6.2.0 HOT 4
- Security vulnerabilities
- Security fix for @node-minify/terser
- Dependency Dashboard
- Publish recenter packages to NPM HOT 2
- Broken link in docs HOT 2
- Node-minify gets stuck at Done! without exiting HOT 4
- direct input HOT 3
- Coments HOT 1
- Suggestion: JSON minifier? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-minify.