feat: initial release

This commit is contained in:
jedmao 2019-06-11 14:01:53 -05:00
parent f4136a165b
commit c818259e23
No known key found for this signature in database
GPG key ID: 7DA6E38CAB81A338
7 changed files with 164 additions and 2 deletions

11
.editorconfig Normal file
View file

@ -0,0 +1,11 @@
root = true
[*]
indent_style = tab
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{package.json,.travis.yml}]
indent_style = space

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

1
.npmrc Normal file
View file

@ -0,0 +1 @@
package-lock=false

22
.travis.yml Normal file
View file

@ -0,0 +1,22 @@
language: node_js
node_js:
- "lts/*"
cache: npm
branches:
only:
- master
after_success:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
deploy:
- provider: script
script: npx semantic-release -r
https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
skip_cleanup: true
keep_history: true
on:
branch: master

View file

@ -1,2 +1,37 @@
# semantic-release-npm-github-config
semantic-release shareable configuration for npm + GitHub
# @jedmao/semantic-release-npm-github-config
[**semantic-release**](https://github.com/semantic-release/semantic-release) shareable config to publish npm packages with [GitHub](https://github.com).
[![Travis](https://img.shields.io/travis/jedmao/semantic-release-npm-github-config.svg?style=flat-square)](https://travis-ci.org/jedmao/semantic-release-npm-github-config)
[![npm version](https://img.shields.io/npm/v/@jedmao/semantic-release-npm-github-config/latest.svg?style=flat-square)](https://www.npmjs.com/package/@jedmao/semantic-release-npm-github-config)
## Plugins
This shareable configuration use the following plugins:
- [`@semantic-release/commit-analyzer`](https://github.com/semantic-release/commit-analyzer)
- [`@semantic-release/release-notes-generator`](https://github.com/semantic-release/release-notes-generator)
- [`@semantic-release/npm`](https://github.com/semantic-release/npm)
- [`@semantic-release/github`](https://github.com/semantic-release/github)
- [`@semantic-release/git`](https://github.com/semantic-release/git)
## Install
```bash
$ npm install --save-dev semantic-release semantic-release-npm-github-config
```
## Usage
The shareable config can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration):
```json
{
"extends": "@jedmao/semantic-release-npm-github-config",
"branch": "master"
}
```
## Configuration
See each [plugin](#plugins) documentation for required installation and configuration steps.

30
index.json Normal file
View file

@ -0,0 +1,30 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogTitle": "Changelog"
}
],
[
"@semantic-release/npm",
{
"tarballDir": "dist"
}
],
[
"@semantic-release/github",
{
"assets": "dist/*.tgz"
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}

62
package.json Normal file
View file

@ -0,0 +1,62 @@
{
"name": "@jedmao/semantic-release-npm-github-config",
"version": "1.0.0",
"description": "semantic-release shareable configuration for npm + GitHub",
"main": "index.json",
"files": [
"index.json"
],
"scripts": {
"commit": "git-cz",
"test": "xo"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jedmao/semantic-release-npm-github-config.git"
},
"keywords": [
"semantic-release",
"semantic-release-config",
"npm",
"github",
"git"
],
"author": "Jed Mao <jedmao@outlook.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/jedmao/semantic-release-npm-github-config/issues"
},
"homepage": "https://github.com/jedmao/semantic-release-npm-github-config#readme",
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"prettier": {
"printWidth": 120,
"trailingComma": "es5"
},
"xo": {
"prettier": true
},
"dependencies": {
"@semantic-release/changelog": "^3.0.2",
"@semantic-release/commit-analyzer": "^6.1.0",
"@semantic-release/git": "^7.0.8",
"@semantic-release/github": "^5.2.10",
"@semantic-release/npm": "^5.1.7",
"@semantic-release/release-notes-generator": "^7.1.4"
},
"peerDependencies": {
"semantic-release": ">=15.13.12 <16.0.0"
},
"devDependencies": {
"commitizen": "^3.1.1",
"cz-conventional-changelog": "^2.1.0",
"semantic-release": "^15.13.12",
"xo": "^0.24.0"
}
}