diff --git a/.versionrc b/.versionrc new file mode 100644 index 0000000..b4c0c6d --- /dev/null +++ b/.versionrc @@ -0,0 +1,15 @@ +{ + "types": [ + { "type": "feat", "section": "✨ Features" }, + { "type": "fix", "section": "🐛 Bug Fixes" }, + { "type": "docs", "section": "✏️ Documentation" }, + { "type": "style", "section": "💄 Styles" }, + { "type": "refactor", "section": "♻️ Code Refactoring" }, + { "type": "perf", "section": "⚡ Performance Improvements" }, + { "type": "test", "section": "✅ Tests" }, + { "type": "revert", "section": "⏪ Revert", "hidden": true }, + { "type": "build", "section": "📦‍ Build System" }, + { "type": "chore", "section": "🚀 Chore" }, + { "type": "ci", "section": "👷 Continuous Integration" } + ] +} \ No newline at end of file diff --git a/.versionrc.js b/.versionrc.js deleted file mode 100644 index 32e7395..0000000 --- a/.versionrc.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - types: [ - { type: 'feat', section: '✨ Features' }, - { type: 'fix', section: '🐛 Bug Fixes' }, - { type: 'docs', section: '✏️ Documentation' }, - { type: 'style', section: '💄 Styles' }, - { type: 'refactor', section: '♻️ Code Refactoring' }, - { type: 'perf', section: '⚡ Performance Improvements' }, - { type: 'test', section: '✅ Tests' }, - { type: 'revert', section: '⏪ Revert', hidden: true }, - { type: 'build', section: '📦‍ Build System' }, - { type: 'chore', section: '🚀 Chore' }, - { type: 'ci', section: '👷 Continuous Integration' }, - ], -}; diff --git a/README.md b/README.md index 45a65c0..9d20ddd 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ **Last update: 2023-8-19** > Main Stack: pnpm, eslint, prettier, commitizen, husky, commitlint + > Secondary Stack:Typescript, git, lint-staged, standard-version ## 1.Initialize project and use pnpm @@ -492,23 +493,69 @@ pnpm install standard-version -D } ``` -> .versionrc.js +> .versionrc ```json -module.exports = { - types: [ - { type: 'feat', section: '✨ Features' }, - { type: 'fix', section: '🐛 Bug Fixes' }, - { type: 'docs', section: '✏️ Documentation' }, - { type: 'style', section: '💄 Styles' }, - { type: 'refactor', section: '♻️ Code Refactoring' }, - { type: 'perf', section: '⚡ Performance Improvements' }, - { type: 'test', section: '✅ Tests' }, - { type: 'revert', section: '⏪ Revert', hidden: true }, - { type: 'build', section: '📦‍ Build System' }, - { type: 'chore', section: '🚀 Chore' }, - { type: 'ci', section: '👷 Continuous Integration' }, - ], -}; +{ + "types": [ + { "type": "feat", "section": "✨ Features" }, + { "type": "fix", "section": "🐛 Bug Fixes" }, + { "type": "docs", "section": "✏️ Documentation" }, + { "type": "style", "section": "💄 Styles" }, + { "type": "refactor", "section": "♻️ Code Refactoring" }, + { "type": "perf", "section": "⚡ Performance Improvements" }, + { "type": "test", "section": "✅ Tests" }, + { "type": "revert", "section": "⏪ Revert", "hidden": true }, + { "type": "build", "section": "📦‍ Build System" }, + { "type": "chore", "section": "🚀 Chore" }, + { "type": "ci", "section": "👷 Continuous Integration" } + ] +} +``` + +Try a few! + +```shel +pnpm run release +``` + +## 5.Publish to Npm Package + +Mange npm's sources: + +```shell +npm install nrm -g +nrm ls +# View all sources list +nrm use npm +# Checkout some source +``` + +> package.json + +Added some information for your `package.json` + +```json +{ + /* ... */ + "bugs": { + "url": "https://github.com/biyuehu/standard-dev-demo/issues" + }, + "repository": { + "type": "git", + "url": "git@github.com:BIYUEHU/standard-dev-demo.git" + }, + "homepage": "https://github.com/biyuehu/standard-dev-demo#readme", + /* ... */ +} ``` +When Everything is ready: + +```shell +npm publish +``` + +View your package: [https://www.npmjs.com/package/standard-dev-demo](https://www.npmjs.com/package/standard-dev-demo) + +> Good!You can develop to a standard project,Now! diff --git a/nest-cli.json b/nest-cli.json deleted file mode 100644 index fe59c49..0000000 --- a/nest-cli.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "sdk": { - "version": "3.1.101" - }, - "runtimes": { - "win-x64": {} - } -} diff --git a/package.json b/package.json index 2bfb58d..69d1185 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "standard-dev-demo", "version": "1.0.4", - "description": "> Stack: pnpm, eslint, prettier, commitizen, husky, commitlint", + "description": "Stack: pnpm, eslint, prettier, commitizen, husky, commitlint", "main": "index.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -11,7 +11,7 @@ "release": "standard-version" }, "keywords": [], - "author": "Hotaru", + "author": "hotaru", "license": "ISC", "devDependencies": { "@commitlint/cli": "12.1.4", diff --git a/src/index.ts b/src/index.ts index 82b5a9e..9c0909d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,4 +3,4 @@ function test(a: string) { a: a ? 1 : 3, }; } -test('ba'); +test('good job!');