Skip to content

Commit

Permalink
feat(ci): semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Feb 6, 2016
1 parent 264b723 commit cf0324e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
19 changes: 15 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- "0.10"
- "0.12"
- '4'
before_install:
- npm i -g npm@^2.0.0
before_script:
- npm prune
after_success:
- npm run semantic-release
branches:
only:
- master
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
[![NPM][cache-require-paths-icon] ][cache-require-paths-url]

[![Build status][cache-require-paths-ci-image] ][cache-require-paths-ci-url]
[![semantic-release][semantic-image] ][semantic-url]

[cache-require-paths-icon]: https://nodei.co/npm/cache-require-paths.png?downloads=true
[cache-require-paths-url]: https://npmjs.org/package/cache-require-paths
[cache-require-paths-ci-image]: https://travis-ci.org/bahmutov/cache-require-paths.png?branch=master
[cache-require-paths-ci-url]: https://travis-ci.org/bahmutov/cache-require-paths
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-url]: https://github.com/semantic-release/semantic-release

This is a partial solution to Node "hunting" for right file to load when you require a 3rd party
dependency. See [Node’s `require` is dog slow](https://kev.inburke.com/kevin/node-require-is-dog-slow/)
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
"name": "cache-require-paths",
"version": "0.1.2",
"description": "Caches resolved paths in module require to avoid Node hunting for right module. Speeds up app load.",
"main": "index.js",
"version": "0.0.0-semantic-release",
"scripts": {
"test": "cd test; npm install; node index; node index --cache; node index --cache"
"test": "cd test; npm install; node index; node index --cache; node index --cache",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
},
"repository": {
"type": "git",
"url": "https://github.com/bahmutov/cache-require-paths.git"
},
"files": [
"index.js"
],
"keywords": [
"npm",
"node",
Expand All @@ -28,7 +33,8 @@
},
"homepage": "https://github.com/bahmutov/cache-require-paths",
"devDependencies": {
"pre-git": "0.2.1"
"pre-git": "0.2.1",
"semantic-release": "^4.3.5"
},
"pre-commit": [
"npm test",
Expand Down
1 change: 1 addition & 0 deletions test/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=http://registry.npmjs.org/

0 comments on commit cf0324e

Please sign in to comment.