Skip to content

Commit e077a83

Browse files
author
Benjamin Coe
committedSep 29, 2016
first release of deploy example
0 parents  commit e077a83

File tree

6 files changed

+67
-0
lines changed

6 files changed

+67
-0
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.nyc_output

‎.travis.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: node_js
2+
node_js:
3+
- "node"
4+
before_install:
5+
- makeshift -s @bcoe -r regisry.npmjs.org
6+
deploy:
7+
provider: npm
8+
email: ben@npmjs.com
9+
api_key: $NPM_TOKEN
10+
on:
11+
tags: true

‎README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Travis Deploy Example
2+
3+
Example of using Travis CI to automatically publish your packages with private
4+
dependencies to npm.
5+
6+
This demo uses:
7+
8+
* Travis CI's [npm deploy](https://docs.travis-ci.com/user/deployment/npm/) functionality.
9+
* the [makeshift](https://github.com/nexdrew/makeshift) package, for generating a `.npmrc`
10+
file with your credentials in it.
11+
* The [standard-version](https://github.com/conventional-changelog/standard-version) package,
12+
for automating [semver](http://semver.org/), and CHANGELOG generation.

‎index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = function () {
2+
return 'hello world!'
3+
}

‎package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "travis-deploy-example",
3+
"version": "1.0.0",
4+
"description": "example of using Travis' deploy feature to publish to npm.",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "nyc mocha test.js"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/bcoe/travis-deploy-example.git"
12+
},
13+
"keywords": [
14+
"deploy",
15+
"travis"
16+
],
17+
"author": "Ben Coe <ben@npmjs.com>",
18+
"license": "ISC",
19+
"bugs": {
20+
"url": "https://github.com/bcoe/travis-deploy-example/issues"
21+
},
22+
"homepage": "https://github.com/bcoe/travis-deploy-example#readme",
23+
"devDependencies": {
24+
"chai": "^3.5.0",
25+
"makeshift": "^1.0.0",
26+
"mocha": "^3.1.0",
27+
"nyc": "^8.3.0",
28+
"standard-version": "^2.4.0"
29+
}
30+
}

‎test.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var example = require('./')
2+
3+
require('chai').should()
4+
5+
describe('tests!', function () {
6+
it ('should say hello world!', function () {
7+
example().should.equal('hello world!')
8+
})
9+
})

0 commit comments

Comments
 (0)
Please sign in to comment.