Skip to content

fix: fs.write instead of stdout#69

Merged
tomap merged 2 commits intohexojs:masterfrom
curbengh:console-fs
Aug 10, 2019
Merged

fix: fs.write instead of stdout#69
tomap merged 2 commits intohexojs:masterfrom
curbengh:console-fs

Conversation

@curbengh
Copy link
Contributor

@curbengh curbengh commented Aug 9, 2019

in some edge case, stdout can be empty when running npm script, i.e. npm run prepare. fs.write is more reliable.

"highlight_alias.json" should be published, it's generated when npm publish. The value in "files" attribute is needed even when "hexo-util": "hexojs/hexo-util", otherwise it would not be generated when npm install.

Address hexojs/hexo#3646 (comment), Address #57 (comment)

How to test

$ rm -r node_modules/

package.json
-  "hexo": "^3.9.0"
+  "hexo": "curbengh/hexo#rc"
$ npm i
$ hexo -v # should be no error
$ npm test

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.214% when pulling 975b968 on curbengh:console-fs into 52820ac on hexojs:master.

@curbengh
Copy link
Contributor Author

curbengh commented Aug 9, 2019

I'll es6-fy scripts/build_highlight_alias.js in a separate PR.

@tomap tomap merged commit d63fda6 into hexojs:master Aug 10, 2019
@curbengh curbengh deleted the console-fs branch August 10, 2019 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants