Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
saitho committed Jan 25, 2020
0 parents commit 3ffeae9
Show file tree
Hide file tree
Showing 15 changed files with 6,584 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.idea
*.iml
node_modules
dist
*.js
!jest.config.js
coverage
docs
.scannerwork/
saitho-npm-test-*.tgz
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
src/*
test/*
*.ts
tsconfig.json
*.iml
.idea
jest.config.js
.travis.yml
coverage
sonar-project.properties
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12.13.1
6 changes: 6 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@saithodev/semantic-release-sharedconf-npm",
"branches": [
"master"
]
}
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
language: node_js
os: linux
dist: trusty

cache:
directories:
- node_modules

install:
- npm i pnpm -g
- pnpm install

jobs:
include:
- stage: build
script:
- pnpm run build
- stage: test code
addons:
sonarcloud:
organization: saitho
script:
- pnpm test
- sonar-scanner
after_success:
- "[[ $TRAVIS_PULL_REQUEST != 'false' ]] && npx semantic-release-github-pr || exit 0"
- stage: release
if: branch = master
node_js: lts/*
script:
- mkdir -p docs
deploy:
provider: script
skip_cleanup: true
script:
- pnpx semantic-release
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# Contributing

Feel free to submit any new features via Pull Request.
Make sure the supplied tests still work and to add own test cases to cover your code.

## PNPM

This repository uses pnpm instead of npm for installing NPM packages.
Install it using `npm i -g pnpm` if you haven't already. All commands from npm are available with pnpm.

Install dependencies with `pnpm install`.

## Commit message hook

This project uses Commizen for consistent commit message formatting.

Please run the following command to setup the Commitizen commit message hook:

```shell script
echo '#!/bin/bash
exec < /dev/tty && node_modules/.bin/git-cz --hook || true' > .git/hooks/prepare-commit-msg && chmod +x .git/hooks/prepare-commit-msg
```

## Running tests

Run tests by this command:

```shell script
pnpm run test
```
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @saithodev/semantic-release-backmerge

[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to back-merge a release in the project's [git](https://git-scm.com/) repository.

[![Build Status](https://ci.saitho.me/api/badges/templates/nodejs/status.svg)](https://ci.saitho.me/templates/nodejs)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
26 changes: 26 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
globals: {
'ts-jest': {
tsConfig: 'tsconfig.json',
},
},
moduleFileExtensions: [
'js',
'json',
'ts',
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
testMatch: [
'**/test/**/*.test.ts',
],

// Code Coverage
coverageReporters: ['lcovonly', 'text'],
collectCoverageFrom: [
'src/**/*.ts',
],
};
40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "@saithodev/semantic-release-backmerge",
"description": "NPM template package",
"version": "1.0.0-dev",
"author": "Mario Lubenka",
"license": "MIT",
"keywords": ["semantic-release", "git", "backmerge", "Git Flow"],
"main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/saitho/semantic-release-backmerge.git"
},
"scripts": {
"build": "tsc",
"docs:build": "typedoc --out ./docs --mode modules --tsconfig ./tsconfig.json ./src/",
"test": "jest --detectOpenHandles --coverage --verbose",
"semantic-release": "semantic-release",
"commit": "git-cz"
},
"dependencies": {
"@semantic-release/error": "^2.1.0"
},
"devDependencies": {
"@saithodev/semantic-release-sharedconf-npm": "^2.0.2",
"@types/jest": "^24.0.23",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "^3.0.2",
"jest": "^24.9.0",
"semantic-release": "^16.0.1",
"ts-jest": "^24.2.0",
"ts-mockito": "^2.5.0",
"typedoc": "^0.15.8",
"typescript": "^3.7.3"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit 3ffeae9

Please sign in to comment.