CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.77k stars 483 forks source link

csslint-node built in required modules+ #628

Closed SailorMax closed 8 years ago

SailorMax commented 8 years ago

+cli fix Now cli support execute via portable node.exe

XhmikosR commented 8 years ago

I'm not sure this is correct since those dependencies should be installed with npm i.

XhmikosR commented 8 years ago

Just tested this and works as expected with npm i. So this is not needed.

SailorMax commented 8 years ago

@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.

XhmikosR commented 8 years ago

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.

SailorMax commented 8 years ago

@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?

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.

XhmikosR commented 8 years ago

Well, you are doing it wrong. That is why npm exists.

SailorMax commented 8 years ago

@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?

SailorMax commented 8 years ago

sample of config for csslint-node-static-cli.js added to previous comment.

XhmikosR commented 8 years ago

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.

SailorMax commented 8 years ago

ok