Skip to content

Commit

Permalink
ci(publish): setup semantic-release pipeline (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltaranto committed Aug 13, 2018
1 parent df4f639 commit 1b45960
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 10 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
language: node_js

node_js:
- 5.2
- 8

after_script:
- npm run coveralls
jobs:
include:
- stage: test
script:
- npm test
- npm run coveralls
- stage: publish
script:
- npm run semantic-release

stages:
- test
- name: publish
if: branch = master
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://img.shields.io/travis/michaeltaranto/less-vars-to-js/master.svg?style=flat-square)](https://travis-ci.org/michaeltaranto/less-vars-to-js)
[![Coverage Status](https://img.shields.io/coveralls/michaeltaranto/less-vars-to-js.svg?style=flat-square)](https://coveralls.io/github/michaeltaranto/less-vars-to-js?branch=master)
[![npm](https://img.shields.io/npm/v/less-vars-to-js.svg?style=flat-square)](https://www.npmjs.com/package/less-vars-to-js)
[![npm](https://img.shields.io/npm/v/less-vars-to-js.svg?style=flat-square)](https://www.npmjs.com/package/less-vars-to-js) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)
# less-vars-to-js
Read [LESS](http://lesscss.org/) variables from the contents of a file and return them as a javascript object.
```js
Expand Down
31 changes: 25 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
{
"name": "less-vars-to-js",
"version": "1.2.1",
"version": "0.0.0-development",
"description": "Read LESS variables from the contents of a file and returning them as a javascript object.",
"main": "dist/index.js",
"scripts": {
"clean": "rm -rf dist && mkdir dist",
"lint": "eslint --config .eslintrc.js src test",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"enforce-coverage": "babel-istanbul check-coverage --branches 100 --statements 100 --lines 100 --functions 100",
"test": "npm run lint && npm run test:unit && npm run enforce-coverage",
"pretest": "npm run lint",
"test": "npm run test:unit && npm run enforce-coverage",
"test:dev": "mocha --compilers js:babel-register --watch --reporter spec",
"test:unit": "babel-node ./node_modules/.bin/babel-istanbul cover _mocha",
"build": "npm run clean && ./node_modules/.bin/babel -d dist/ src/",
"prepublish": "npm run build"
"prebuild": "npm run clean",
"build": "babel -d dist/ src/",
"commit": "git-cz",
"commitmsg": "commitlint --edit --extends @commitlint/config-conventional",
"prepublishOnly": "npm run build",
"semantic-release": "semantic-release"
},
"repository": {
"type": "git",
Expand All @@ -22,7 +27,7 @@
"name": "Michael Taranto",
"homepage": "https://github.com/michaeltaranto"
},
"license": [
"licenses": [
{
"type": "MIT",
"url": "http://michaeltaranto.mit-license.org"
Expand All @@ -33,16 +38,30 @@
},
"homepage": "https://github.com/michaeltaranto/less-vars-to-js#readme",
"devDependencies": {
"@commitlint/cli": "^7.0.0",
"@commitlint/config-conventional": "^7.0.1",
"babel-cli": "^6.7.7",
"babel-eslint": "^6.0.3",
"babel-istanbul": "^0.8.0",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-preset-es2015": "^6.6.0",
"babel-register": "^6.7.2",
"chai": "^3.5.0",
"commitizen": "^2.10.1",
"coveralls": "^2.11.9",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^2.8.0",
"eslint-plugin-mocha": "^2.2.0",
"mocha": "^2.4.5"
"husky": "^0.14.3",
"mocha": "^2.4.5",
"semantic-release": "^15.9.8"
},
"engines": {
"node": ">=8"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}

0 comments on commit 1b45960

Please sign in to comment.