Skip to content

Commit

Permalink
🔨 refactor: use clack directly (#1)
Browse files Browse the repository at this point in the history
* 🔨 refactor: use clack directly

* 🔨 refactor: use clack directly

* 🔧 chore: remove spinner
  • Loading branch information
Jannchie authored Sep 5, 2023
1 parent f668d6f commit e0741cd
Show file tree
Hide file tree
Showing 5 changed files with 294 additions and 103 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
"license": "MIT",
"devDependencies": {
"@antfu/eslint-config": "^0.41.0",
"@clack/prompts": "^0.7.0",
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.2.1",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.3",
"@types/node": "^20.5.9",
"commander": "^11.0.0",
"node-emoji": "^2.1.0",
"rollup": "^3.28.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"dependencies": {
"consola": "^3.2.3"
}
}
93 changes: 83 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import process from 'node:process'
import ts from '@rollup/plugin-typescript'
import json from '@rollup/plugin-json'
import terser from '@rollup/plugin-terser'
import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import replace from '@rollup/plugin-replace'
import packageJson from './package.json' assert { type: 'json' }

export default {
input: 'src/index.ts',
Expand All @@ -21,5 +24,10 @@ export default {
exportConditions: ['node', 'default', 'module', 'import'],
browser: false,
}),
replace({
'preventAssignment': true,
'process.env.npm_package_version': `'${packageJson.version}'`,
}),

],
}
106 changes: 66 additions & 40 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,87 +4,113 @@
"data": {
"feat": {
"display": "feat",
"emoji": ":sparkles:"
"emoji": ":sparkles:",
"selectable": true
},
"chore": {
"display": "chore",
"emoji": ":wrench:"
"emoji": ":wrench:",
"selectable": true
},
"fix": {
"display": "fix",
"emoji": ":adhesive_bandage:",
"selectable": true
},
"refactor": {
"display": "refactor",
"emoji": ":hammer:"
"emoji": ":hammer:",
"selectable": true
},
"fix": {
"display": "fix",
"emoji": ":adhesive_bandage:"
"style": {
"display": "style",
"emoji": ":art:",
"selectable": true
},
"hotfix": {
"display": "hotfix",
"emoji": ":ambulance:"
"move": {
"display": "move",
"emoji": ":truck:",
"selectable": true
},
"docs": {
"display": "docs",
"emoji": ":books:"
"emoji": ":books:",
"selectable": true
},
"i18n": {
"display": "i18n",
"emoji": ":globe_with_meridians:"
"wip": {
"display": "wip",
"emoji": ":construction:",
"selectable": true
},
"init": {
"display": "init",
"emoji": ":tada:",
"selectable": true
},
"release": {
"display": "release",
"emoji": ":bookmark:",
"selectable": true
},
"hotfix": {
"display": "hotfix",
"emoji": ":ambulance:",
"selectable": false
},
"build": {
"display": "build",
"emoji": ":building_construction:"
"emoji": ":package:",
"selectable": false
},
"version": {
"display": "version",
"emoji": ":bookmark:"
"i18n": {
"display": "i18n",
"emoji": ":globe_with_meridians:",
"selectable": false
},
"test": {
"display": "test",
"emoji": ":rotating_light:"
"emoji": ":rotating_light:",
"selectable": false
},
"ci": {
"display": "ci",
"emoji": ":construction_worker:"
"emoji": ":robot:",
"selectable": false
},
"cd": {
"display": "cd",
"emoji": ":construction_worker:"
"emoji": ":robot:",
"selectable": false
},
"workflow": {
"display": "workflow",
"emoji": ":construction_worker:"
},
"wip": {
"display": "wip",
"emoji": ":construction_worker:"
},
"init": {
"display": "init",
"emoji": ":tada:"
},
"style": {
"display": "style",
"emoji": ":art:"
"emoji": ":robot:",
"selectable": false
},
"docker": {
"display": "docker",
"emoji": ":whale:"
"emoji": ":whale:",
"selectable": false
},
"revert": {
"display": "revert",
"emoji": ":rewind:"
"emoji": ":rewind:",
"selectable": false
},
"config": {
"display": "config",
"emoji": ":wrench:"
"emoji": ":wrench:",
"selectable": false
},
"release": {
"display": "release",
"emoji": ":bookmark:"
"version": {
"display": "version",
"emoji": ":bookmark:",
"selectable": false
},
"tag": {
"display": "tag",
"emoji": ":bookmark:"
"emoji": ":bookmark:",
"selectable": false
}
}
}
Loading

0 comments on commit e0741cd

Please sign in to comment.