Skip to content

Commit

Permalink
Remove postinstall step
Browse files Browse the repository at this point in the history
Use a `prepare` hook instead of a `postinstall` hook to generate
the `highlight_alias.json` file. This means that the file is generated
during the publication of package to npm or when manually running
`npm install` in the project directory.
The previous behavior was to generate this step on the consumer
side: this was the cause of numerous hard-to-reproduce issues due
to the variety of environments.

Closes #20
Closes #23
Closes #24
  • Loading branch information
demurgos committed Oct 26, 2017
1 parent f8e237a commit 2ac21d3
Show file tree
Hide file tree
Showing 5 changed files with 2,396 additions and 3 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ coverage/
gulpfile.js
.idea/
appveyor.yml
highlight_alias.json
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ node_js:
- "6"
- "node"

# For older versions of npm (ie. the one bundled with Node 6), we need to manually run `prepare`
# to build the project, hence the first line. You can still install and consume the package without any issue.
script:
- [[ "$TRAVIS_NODE_VERSION" == "6" ]] && npm run prepare
- npm run eslint
- npm run jscs
- npm run test-cov
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Next

- **[Fix]** Remove postinstall step, fixes installations issues for some systems. [#24](https://github.com/hexojs/hexo-util/issues/24)
Loading

0 comments on commit 2ac21d3

Please sign in to comment.