Closed SailorMax closed 8 years ago
I'm not sure this is correct since those dependencies should be installed with npm i
.
Just tested this and works as expected with npm i
. So this is not needed.
@XhmikosR I just want to use your script with portable node.exe (without npm. Only node.exe and node.lib. As alternative to cscript.exe). Copy/Paste required scripts and start to use it. Without any additional installs. In result I expect all required external libraries has to be built in. Do you have some arguments against this behavior?
thank you.
What script?
You are not supposed to use csslint-node.js as standalone. It's published on npm and you need to do npm i
.
@XhmikosR I don't have on every target PC NodeJs. What I need/expect in my directory with csslint: node.exe node.lib csslint-node.js csslint-node-cli.js (cli.js) validate_css.bat
Now I can just copy these 5 files and start using it. Without installing complete NodeJs. I don't need npm
. I don't want remember what I have to install for work with csslint. I don't need directories with many other files with external libraries. Why I have to, if they can be built in?
validate_css.bat my.css
which has java.exe -jar rhino.jar csslint-rhino.js "%1"
)validate_css.bat my.css
which has cscript.exe csslint-wsh.js "%1"
)npm install clone
; npm install parserlib
; and only after that: validate_css.bat my.css
which has node.exe csslint-node-cli.js "%1"
) OR (install node; npm install csslint
; and only after that: node.exe ?\cli.js
). Both cases require preparations before using csslint.
Why such a difference?I understand that you optimized csslint for computer where installed NodeJS. Ok. Comfortably. npm install csslint
and start to use.
Now think about portable version, where user don't have NodeJS and can't or don't want to install it. Currently for this case optimized only Rhino/Wsh versions. I offer optimize for this case Node version. Node work faster than Rhino/Wsh and can be portable.
thank you.
Well, you are doing it wrong. That is why npm
exists.
@XhmikosR You didn't answer to "Why such a difference?" What is wrong in using csslint as portable version? In my case it is less troublesome solution. What is wrong in embedding external libraries? Allows users to use the latest patches of them? Ok. Then may be add one more distribute: csslint-node-static-cli.js as version for my case?
node_static_cli: {
options: {
banner: "#!/usr/bin/env node\n<%= banner %>",
footer: "\nmodule.exports.CSSLint = CSSLint;"
},
files: {
"<%= build_dir %>/csslint-node-static-cli.js": ["<%= core_files %>", "src/cli/common.js", "src/cli/node.js"]
}
},
Or you just don't want make any changes in this direction?
sample of config for csslint-node-static-cli.js added to previous comment.
It just seems useless to me because you are not supposed to use npm that way.
Personally, I don't like your approach at all. You can do what you want on your fork or on build time. But if other people ask for it we can revisit it. It's not my choice, I just express my own opinion.
ok
+cli fix Now cli support execute via portable node.exe