Skip to content

Commit

Permalink
Merge pull request #75 from technote-space/release/v0.0.7
Browse files Browse the repository at this point in the history
release/v0.0.7
  • Loading branch information
technote-space authored Feb 25, 2020
2 parents e9bf2da + 2fb7bf5 commit 100f0bf
Show file tree
Hide file tree
Showing 7 changed files with 1,322 additions and 135 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
6 changes: 6 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
}
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{js,jsx,ts,tsx}": "yarn lint:fix"
}
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Technote
Copyright (c) 2020 Technote

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT 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.
THE SOFTWARE.
29 changes: 24 additions & 5 deletions bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,47 @@

set -e

if [[ $(uname -s) == 'Darwin' ]]; then
if [[ $(sed --version 2> /dev/null || : | grep -c "gsed") == 0 ]]; then
echo "Please setup to use gsed instead of sed"
echo ">> brew install gnu-sed"
echo ">> alias sed='gsed'"
exit
fi
fi

echo "Owner: [= technote-space]"
read -r OWNER
if [[ -z "${OWNER}" ]]; then
OWNER=technote-space
fi

echo "Repo: "
readonly DIR=$(cd "$(dirname "$0")/.."; pwd)
readonly DEFAULT_REPO=${DIR##*/}
readonly DEFAULT_TITLE=$(echo "${DEFAULT_REPO}" | sed 's/[-_]/ /g' | tr "[:upper:]" "[:lower:]" | sed 's/\b\(.\)/\u\1/g')

echo "Repo: [= ${DEFAULT_REPO}]"
read -r REPO
if [[ -z "${REPO}" ]]; then
exit
REPO=${DEFAULT_REPO}
fi

echo "Title: [= ]"
echo "Title: [= ${DEFAULT_TITLE}]"
read -r TITLE
if [[ -z "${TITLE}" ]]; then
TITLE=${DEFAULT_TITLE}
fi

echo "DESCRIOTION: [= ]"
read -r DESCRIOTION


echo "Repository: ${OWNER}/${REPO}"
echo "Title: ${TITLE}"
echo ""
echo "=================================="
echo "Repository: ${OWNER}/${REPO}"
echo "Title: ${TITLE}"
echo "Description: ${DESCRIOTION}"
echo "=================================="
# shellcheck disable=SC2162
read -n1 -p "ok? (y/N): " yn
if [[ $yn != [yY] ]]; then
Expand Down
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@technote-space/ts-package-template",
"version": "0.0.6",
"version": "0.0.7",
"description": "Template for npm package.",
"author": {
"name": "Technote",
Expand All @@ -27,22 +27,26 @@
],
"dependencies": {},
"devDependencies": {
"@technote-space/github-action-test-helper": "^0.2.2",
"@types/jest": "^25.1.2",
"@types/node": "^13.7.1",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/parser": "^2.19.2",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@technote-space/github-action-test-helper": "^0.2.4",
"@types/jest": "^25.1.3",
"@types/node": "^13.7.4",
"@typescript-eslint/eslint-plugin": "^2.21.0",
"@typescript-eslint/parser": "^2.21.0",
"eslint": "^6.8.0",
"husky": "^4.2.3",
"jest": "^25.1.0",
"jest-circus": "^25.1.0",
"ts-jest": "^25.2.0",
"typescript": "^3.7.5"
"lint-staged": "^10.0.7",
"ts-jest": "^25.2.1",
"typescript": "^3.8.2"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"setup": "bash bin/setup.sh && if [[ -f __DELETE__ ]]; then rm -rdf bin; rm -f __DELETE__; fi",
"setup": "if [[ $(uname -s) == 'Darwin' ]]; then BASH_ENV=~/.bashrc bash -O expand_aliases bin/setup.sh; else bash bin/setup.sh; fi && if [[ -f __DELETE__ ]]; then rm -rdf bin __DELETE__; fi",
"build": "tsc",
"test": "yarn lint && yarn cover",
"lint": "eslint 'src/**/*.ts' '__tests__/**/*.ts' --cache",
Expand Down
Loading

0 comments on commit 100f0bf

Please sign in to comment.