HE Shi-Jun

Results 543 comments of HE Shi-Jun

I assume editorconfig settings are much simpler than eslint/tslint, and `extends` make it a little bit hard to see all settings value, so maybe we should always copy the file?

GitHub support query param `ts` to control the tabsize. For example: https://github.com/hax/dotfiles/blob/master/compress-editorconfig.js?ts=3 You could also input `$('[data-tab-size]').dataset.tabSize = TAB_SIZE_YOU_LIKE` in the devtool console to change it.

WHATWG Encoding spec deprecates all legacy encodings include utf-16 and latin1. Though this spec is mainly for Web browsers, it's has important reference value. New projects could stick on utf-8....

> (Plus .bat files are no longer reliable if written in UTF-8.) @kAlvaro Why? I have no idea about it.

@kAlvaro As the discussion of stackoverflow, you need use `chcp` to change code page to utf8 (65001). Anyway, old BAT is not unicode aware, and should always use simple ASCII...

See previous discussion: https://github.com/editorconfig/editorconfig/issues/269

@fouber 在grunt/gulp工具链中,我感觉有 yo 来做你说的“工具连接框架和规范的问题”。

@fouber 还是有这样的模块的。比如md5、hmac等用到的crypto模块。

@chuguixin fs模块是有的。还有模块可以把所有readFileSync的常量调用全部替换成直接内嵌文件。 另外,stream在浏览器里也会用的。比如websocket是可以传输二进制的。只不过从我的角度看,将来未必是统一在node api上,而是统一在 html5 api 上。比如未必是统一在 fs 模块,而是统一在 File API。

@chuguixin See https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm browserify 的初衷确实是让你依赖node标准库的程序也能在浏览器上用,因此它提供了几乎所有node api在浏览器上的对应版本。 但是这并不表示你的程序必须用node的模块。因为现在 html5 的 API 已经非常丰富,特别是,大量API倒过来在node中有polyfill。举例来说,网络通讯我就不用node的http模块,而用 xmlhttprequest 模块,它与浏览器中的 XMLHttpRequest API 一致。 node的fs模块自然不会改,但是不代表你必须用它啊。你完全可以倒过来用File API,用DOM storage,它们都有node上的实现。所以,browserify虽然初衷是让你可以用 node api 写程序跑在浏览器中,但是它只是一个工具,我们也完全可以反其道而行之,利用它让我们写出使用 html5 api 的程序,同时可以跑在浏览器和node中。