Comments (6)
Hi,
I think too, that must be the cause.
Can't you use relative path ? fileIn: ["../../main.js"]
Or maybe you already solve ? (sorry for the delay)
from node-minify.
Hi, sorry for the late too, I switched projects and didn't see that notification !
And no, I didn't fix it at the moment.
But the issue I have is that I would like to minify some files who are not in the working directory !
So let's imagine the case :
- I've got an app (so the working directory) that I launch with node-webkit. (I guess it's globaly the same effect as launching an app in CLI).
- In this app, I'm creating a new folder, on a user-choice form (https://github.com/rogerwang/node-webkit/wiki/File-dialogs#other-types-of-dialogs) that allow to select a folder on the user laptop / desktop. Then I add some files in that new folder, that I would to minify on the fly.
Do you think it's possible without absolute links ?
It's for some internal stuff in my company, nobody really cares about security problems that some kind of application could generate :)
Thanks for your help !
from node-minify.
And can't you copy those files in the working directory and then copy minified files in the user-choice folder ?
I don't see other solution, I think this is more a bad access to the files.
Or maybe the temp path, can you specify another path ?
new compressor.minify({
type: 'yui-js',
fileIn: 'public/js/base.js',
fileOut: 'public/js/base-min-yui.js',
tempPath: '/tmp',
callback: function(err){
console.log(err);
}
});
from node-minify.
I didn't try to specify a temp path at the moment, but maybe it could be interesting for me, how is it working ?
Can I specify my new folder as the tempPath ?
I should try it I think, and let you know the result.
from node-minify.
Indeed, all temporary files will be created in the temp folder.
Give a try :)
from node-minify.
Okay very nice, I'll check that soon :)
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.