Skip to content

Commit

Permalink
Merge pull request #63 from technote-space/release/v0.0.4
Browse files Browse the repository at this point in the history
release/v0.0.4
  • Loading branch information
technote-space authored Feb 12, 2020
2 parents 6411aca + a381ee2 commit 4388065
Show file tree
Hide file tree
Showing 5 changed files with 1,210 additions and 1,365 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/node_modules
/coverage
/dist
.eslintcache
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@

Template for npm package.

## Table of Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
<details>
<summary>Details</summary>

- [Setup](#setup)
- [yarn](#yarn)
- [npm](#npm)
- [Author](#author)

</details>
<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Setup
Expand Down
61 changes: 30 additions & 31 deletions bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,45 @@

set -e

rm -f .github/workflows/check_version.yml
rm -f .github/workflows/ci.yml
rm -f .github/workflows/gh_releases.yml
rm -f .github/workflows/issue_opened.yml
rm -f .github/workflows/pr_opened.yml
rm -f .github/workflows/pr_updated.yml
rm -f .github/workflows/project_card_moved.yml
rm -f .github/workflows/toc.yml

rm -f .github/card-labeler.yml
rm -f .github/config.yml
rm -f .github/labeler.yml
rm -f .github/no-response.yml
rm -f .github/pr-labeler.yml
rm -f .github/release-drafter.yml
rm -f .github/stale.yml

rm -rdf .github/ISSUE_TEMPLATE

rm -f .github/CODE_OF_CONDUCT.md
rm -f .github/CODEOWNERS
rm -f .github/CONTRIBUTING.md
rm -f .github/FUNDING.yml
rm -f .github/pull_request_template.md

rm -f _config.yml
rm -f README.md
touch README.md
echo "Owner: [= technote-space]"
read -r OWNER
if [[ -z "${OWNER}" ]]; then
OWNER=technote-space
fi

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

echo "Repository: ${OWNER}/${REPO}"
# shellcheck disable=SC2162
read -n1 -p "ok? (y/N): " yn
if [[ $yn != [yY] ]]; then
exit
fi

sed -i "s/technote-space/${OWNER}g/" .github/CODEOWNERS
sed -i "s/technote-space/${OWNER}/g" README.md
sed -i "s/ts-package-template/${REPO}/g" README.md
sed -i "s/technote-space\/ts-package-template/${OWNER}\/${REPO}/g" package.json

if [[ "${OWNER}" != 'technote-space' ]]; then
rm -f .github/FUNDING.yml
rm -f _config.yml
sed -i '26,100d' README.md
fi

sed -i '/setup.sh/d' package.json
touch __DELETE__

cat << EOS
Please edit package.json
- name
- version
- description
- authoer
- license
- keywords
- homepage
- repository
- bugs
EOS
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"name": "@technote-space/ts-package-template",
"version": "0.0.3",
"version": "0.0.4",
"description": "Template for npm package.",
"author": "Technote <technote.space@gmail.com> (https://technote.space)",
"author": {
"name": "Technote",
"email": "technote.space@gmail.com",
"url": "https://technote.space"
},
"license": "MIT",
"keywords": [
"github",
Expand All @@ -23,25 +27,25 @@
],
"dependencies": {},
"devDependencies": {
"@technote-space/github-action-test-helper": "^0.1.3",
"@types/jest": "^24.9.0",
"@types/node": "^13.1.8",
"@typescript-eslint/eslint-plugin": "^2.17.0",
"@typescript-eslint/parser": "^2.17.0",
"@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",
"eslint": "^6.8.0",
"jest": "^24.9.0",
"jest-circus": "^24.9.0",
"ts-jest": "^24.3.0",
"jest": "^25.1.0",
"jest-circus": "^25.1.0",
"ts-jest": "^25.2.0",
"typescript": "^3.7.5"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"setup": "bash bin/setup.sh && rm -rdf bin",
"setup": "bash bin/setup.sh && if [[ -f __DELETE__ ]]; then rm -rdf bin; rm -f __DELETE__; fi",
"build": "tsc",
"test": "yarn lint && yarn cover",
"lint": "eslint 'src/**/*.ts' '__tests__/**/*.ts'",
"lint": "eslint 'src/**/*.ts' '__tests__/**/*.ts' --cache",
"lint:fix": "eslint --fix 'src/**/*.ts' '__tests__/**/*.ts'",
"cover": "jest --coverage",
"update": "ncu -u && yarn install && yarn upgrade && yarn audit"
Expand Down
Loading

0 comments on commit 4388065

Please sign in to comment.