Skip to content

Commit

Permalink
Deploy on npm
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Apr 19, 2016
1 parent 1791663 commit 9e96f91
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 11 deletions.
16 changes: 16 additions & 0 deletions .npmignore
@@ -0,0 +1,16 @@
/karma-conf.js
/lingua.cfg
/Makefile
/ngeo_deploy_key
/TODO.md
/npm.mk
/secrets.tar
/secrets.tar.enc
/test/
/.build/
/examples/
/docs/
/jsdoc/
/contribs/gmf/examples/
/contribs/gmf/apps/
/contribs/gmf/build/
18 changes: 17 additions & 1 deletion .travis.yml
Expand Up @@ -3,7 +3,10 @@ sudo: false
language: node_js

env:
- CXX=g++-4.8
global:
- CXX=g++-4.8
- secure: "l/McmiK4djffT04/+5MxW9sy4yO80Rf6vq+nZb5P647A6pXpPLdoRLGo50CtYRiKnFLiChHk2QxUOspeKuIKE+UQAm9dGmyMgfYkj/jwxIBd0YQqavaGzoWo5U1ZSGKeVd3kJlIaUJyLlnKbBOmFCY00c4JLveAagsV53lbephY="

addons:
apt:
sources:
Expand Down Expand Up @@ -46,6 +49,11 @@ after_success:

before_deploy:
- export GIT_BRANCH=${TRAVIS_BRANCH}
- .build/python-venv/bin/pip install jsongrep
- echo "_auth = ${NPM_AUTH}" > ~/.npmrc
- echo "email = stephane.brunner@camptocamp.com" >> ~/.npmrc
- ls -l ~/.npmrc
- cat ~/.npmrc

deploy:
- provider: script
Expand All @@ -55,6 +63,14 @@ deploy:
repo: camptocamp/ngeo
all_branches: true
node: "0.10"
- provider: script
script: npm publish
skip_cleanup: true
on:
node: "0.10"
repo: camptocamp/ngeo
tags: true
condition: '"`.build/python-venv/bin/jsongrep -e version package.json`" == "${TRAVIS_TAG}"'
- &transifex
provider: script
script: make transifex-send
Expand Down
8 changes: 4 additions & 4 deletions README.md
@@ -1,8 +1,5 @@
# ngeo

[![Travis CI
Status](https://api.travis-ci.org/camptocamp/ngeo.svg?branch=master)](https://travis-ci.org/camptocamp/ngeo)

ngeo is a JS library that aims to ease the development of applications based on
[AngularJS](https://angularjs.org/) and [OpenLayers 3](http://openlayers.org).

Expand Down Expand Up @@ -38,4 +35,7 @@ Other docs:
developers.
* [Application development guidelines](docs/guidelines.md) – This guide is for
application developers using ngeo.
* [Transifex](https://www.transifex.com/camptocamp/ngeo/) – Translation platform
* [npm](https://www.npmjs.com/package/ngeo) – Package on npm.
* [Transifex](https://www.transifex.com/camptocamp/ngeo/) – Translation platform.
* [Travis](https://travis-ci.org/camptocamp/ngeo) – Continus integration.
* [coveralls](https://coveralls.io/github/camptocamp/ngeo) – Test coverage.
8 changes: 8 additions & 0 deletions docs/developer-guide.md
Expand Up @@ -216,6 +216,14 @@ fdescribe('...', function() {
fit('...', function() {
```
### Create a package on npm
Set the version in the `package.json` file.
Create a tag named the same as the version.
Travis will create a new package on npm.
### Create a new stabilisation branch
When we create a new stabilisation branch we should also duplicate the localisation.
Expand Down
10 changes: 4 additions & 6 deletions package.json
@@ -1,9 +1,9 @@
{
"name": "ngeo",
"version": "0.0.1",
"version": "0.0.2",
"description": "AngularJS OpenLayers 3 Library",
"scripts": {
"install": "make -f npm.mk install"
"prepublish": "make -f npm.mk install"
},
"repository": {
"type": "git",
Expand All @@ -16,13 +16,11 @@
"bin": {
"compile-catalog": "buildtools/compile-catalog.js"
},
"dependencies": {
"devDependencies": {
"svg2ttf": "4.0.0",
"ttf2eot": "1.3.0",
"ttf2woff": "2.0.1",
"async": "1.5.2"
},
"devDependencies": {
"async": "1.5.2",
"angular": "1.5.3",
"angular-animate": "1.5.3",
"angular-gettext": "2.2.1",
Expand Down

0 comments on commit 9e96f91

Please sign in to comment.