shadowsocks / shadowsocks-nodejs

https://github.com/shadowsocks/shadowsocks
Other
1.25k stars 724 forks source link

use minimist to simplify the implementation #103

Closed yorkie closed 10 years ago

yorkie commented 10 years ago

Could you care about using this module substack/minimist to simplify the util.parseArgs? IMO that is an improvement for contributors :)

clowwindy commented 10 years ago

Zero dependency is very helpful for users who are new to node.js and not familiar with npm, Especially for Windows users.

yorkie commented 10 years ago

Hmm, the new user is not the new contributor, and the contributor must be familiar with these very basic libraries.

And the key of this issue is modular, that simplify the source code and avoid to the bikeshedding problem, zero dependencies might not be recommended by node.

Sent from my iPhone

On Jun 12, 2014, at 9:43, clowwindy notifications@github.com wrote:

Zero dependency is very helpful for users who are new to node.js and not familiar with npm, Especially for Windows users.

\ Reply to this email directly or view it on GitHub.

clowwindy commented 10 years ago

Most Windows users are not programmers. They are just normal people. They just click the Download ZIP button to grab an archive, unarchive the zip file with WinRAR. Then they would like to put an node.exe into that folder and create a run.bat file copied from some blog. They edit config.json with notepad (that's why I put that file in the repository, and why that file uses CRLF). Often they will send the folder to their friends via QQ.

That's what a lot of users do and we have to face the problem. Asking them to run npm install seems impossible.

Goagent even doesn't have a setup.py. They get every dependency packed in the repository.

We might just move util.parseArgs into a separate module to solve the problem.

yorkie commented 10 years ago

We could keep the node_modules for those people, is this a solution for you?

I really think we should separate devs and users.

Sent from my iPhone

On Jun 12, 2014, at 11:41, clowwindy notifications@github.com wrote:

Most Windows users are not programmers. They are just normal people. They just click the Download ZIP button to grab an archive, unarchive the zip file with WinRAR. Then they would like to put an node.exe into that folder and create a run.bat file copied from some blog. They edit config.json with notepad (that's why I put that file in the repository, and why that file uses CRLF). Often they will send the folder to their friends via QQ.

That's what a lot of users do and we have to face the problem. Asking them to run npm install seems impossible.

Goagent even doesn't have a setup.py. They packed every dependency in the repository.

We might just move util.parseArgs into a separate module to solve the problem.

\ Reply to this email directly or view it on GitHub.

clowwindy commented 10 years ago

Putting node_modules in the repository seems weird. Normally that's something in the .gitignore.

utils.parseArgs is just a few lines of code. After replacing it with minimist we still have to convert the result to a normalized config.json dictionary.

yorkie commented 10 years ago

Make a lot of sence, and I would close this later.

Thanks :)

Sent from my iPhone

On Jun 12, 2014, at 19:09, clowwindy notifications@github.com wrote:

Putting node_modules in the repository seems weird. Normally that's something in the .gitignore.

utils.parseArgs is just a few lines of code. After replacing it with minimist we still have to convert the result to a normalized config.json dictionary.

\ Reply to this email directly or view it on GitHub.