Skip to content

Commit

Permalink
chore(ci): added semantic release and travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jan 3, 2016
1 parent dd73b4c commit 57482b4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '4'
before_install:
- npm i -g npm@^2.0.0
before_script:
- npm prune
script:
- npm run lint
- npm run test
after_success:
- npm run semantic-release
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# express-service
> ExpressJS server running inside ServiceWorker
[![NPM][express-service-icon] ][express-service-url]

[![Build status][express-service-ci-image] ][express-service-ci-url]
[![semantic-release][semantic-image] ][semantic-url]

As a proof of concept I have been able to intercept fetch requests from the
page and serve them using an ExpressJS running inside a ServiceWorker.

There was a little bit of hacking inside the bundle [dist/service.js](dist/service.js)
that was created using Browserify. I will clean up the code to be able to recreate
the bundle automatically. For now you can find the updated server code starting at line 41692.

## The ExpressJS server

The ExpressJS server can be found in [src/demo-server.js](src/demo-server.js), it has 2 pages
Expand Down Expand Up @@ -127,3 +128,10 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

[express-service-icon]: https://nodei.co/npm/express-service.png?downloads=true
[express-service-url]: https://npmjs.org/package/express-service
[express-service-ci-image]: https://travis-ci.org/bahmutov/express-service.png?branch=master
[express-service-ci-url]: https://travis-ci.org/bahmutov/express-service
[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
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "express-service",
"version": "1.0.0",
"description": "Express server running inside ServiceWorker",
"version": "0.0.0-semantic-release",
"main": "src/service.js",
"files": [
"src"
Expand All @@ -10,25 +10,22 @@
"test": "npm run lint",
"lint": "standard *.js src/*.js examples/**/*.js",
"commit": "commit-wizard",

"build": "npm run todomvc-example",

"basic-example": "npm run basic-example-service && npm run basic-example-client",
"basic-example-service": "browserify examples/basic/service-worker-server.js -o dist/express-service.js",
"basic-example-client": "cp src/client.js dist/client.js",

"todomvc-example": "npm run todomvc-example-service && npm run todomvc-example-client",
"todomvc-example-service": "browserify examples/todomvc/index.js -o dist/express-service.js",
"todomvc-example-client": "cp src/client.js dist/client.js",

"start": "npm run stand-alone",
"stand-alone": "node --harmony src/stand-alone.js",
"dev-start": "http-server dist -c-1 -p 3007",
"issues": "git-issues"
"issues": "git-issues",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bahmutov/express-service.git"
"url": "https://github.com/bahmutov/express-service.git"
},
"keywords": [
"express",
Expand Down Expand Up @@ -64,7 +61,8 @@
"http-server": "0.8.5",
"pre-git": "3.1.2",
"standard": "5.4.1",
"todomvc-express": "1.1.2"
"todomvc-express": "1.1.2",
"semantic-release": "^4.3.5"
},
"dependencies": {
"check-more-types": "2.10.0",
Expand Down

0 comments on commit 57482b4

Please sign in to comment.