@component-hook/create-app 0.2.4-alpha.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +82 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # @component-hook/create-app
2
+
3
+ Scaffolding a basic `typescript` project.
4
+
5
+ > **Compatibility Note:**
6
+ > Requires [Node.js](https://nodejs.org/en/) version 18+, 20+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
7
+
8
+ <p>
9
+ <a href="https://npm-stat.com/charts.html?package=@component-hook/create-app">
10
+ <img src="https://img.shields.io/npm/dm/@component-hook/create-app.svg" alt="npm"/>
11
+ </a>
12
+ <a href="https://www.npmjs.com/package/@component-hook/create-app">
13
+ <img src="https://img.shields.io/npm/v/@component-hook/create-app.svg" alt="npm"/>
14
+ </a>
15
+ </p>
16
+
17
+ ## Create Project
18
+
19
+ ```bash
20
+ $ npm create @component-hook/app@latest
21
+
22
+ # or use yarn
23
+ $ yarn create @component-hook/app
24
+
25
+ # or use pnpm
26
+ $ pnpm create @component-hook/app
27
+ ```
28
+
29
+ Then follow the prompts!
30
+
31
+ You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a project, run:
32
+
33
+ ```bash
34
+ $ npm create @component-hook/app@latest basic-app -- --template vue
35
+
36
+ # yarn
37
+ $ yarn create @component-hook/app basic-app --template vue
38
+
39
+ # pnpm
40
+ $ pnpm create @component-hook/app basic-app --template vue
41
+ ```
42
+
43
+ Currently supported template presets include:
44
+
45
+ - `vue`
46
+
47
+ ## Project Default Setup
48
+
49
+ - [Vite](https://cn.vite.dev/)
50
+ - [TypeScript](https://www.typescriptlang.org/)
51
+ - [Axios](https://github.com/axios/axios)
52
+ - [TailwindcSS](https://tailwindcss.com/)
53
+ - [PostCSS](https://postcss.org/) w/ `postcss-nesting` plugin
54
+ - [Cssnano](https://cssnano.github.io/cssnano/) for minimizing production CSS
55
+ - [Postcss-pxtorem](https://www.npmjs.com/package/postcss-pxtorem) generates rem units from pixel units
56
+ - [Vite-plugin-svg-icons](https://github.com/vbenjs/vite-plugin-svg-icons) generate svg sprite map
57
+ - [Eslint](https://eslint.org/)
58
+ - [@component-hook/eslint-plugin](https://www.npmjs.com/package/@component-hook/eslint-plugin?activeTab=readme)
59
+ - [Prettier](https://prettier.io/)
60
+ - [Husky](https://www.npmjs.com/package/husky) to improves commits
61
+ - if encounter npx: command not found, can execute `ln -s $(which npx) /usr/local/bin/npx` in zsh
62
+ - [commitlint](https://commitlint.js.org/#/) checks if your commit messages meet the conventional commit format
63
+ - [lint-staged](https://github.com/okonet/lint-staged) filter files checked by pre commit lint
64
+ - Alias `@` to `<project_root>/src`
65
+ - Mock use [msw](https://mswjs.io/)
66
+ - `npx msw init ./public`
67
+ - Unit test use [Vitest](https://vitest.dev/) + [Testing Library](https://testing-library.com/)
68
+ - [jsdom](https://www.npmjs.com/package/jsdom)
69
+ - [@vitest/coverage-v8](https://vitest.dev/guide/coverage.html)
70
+ - [@testing-library/jest-dom](https://testing-library.com/docs/ecosystem-jest-dom/)
71
+ - [@testing-library/user-event](https://testing-library.com/docs/ecosystem-user-event/)
72
+ - E2E test use [playwright](https://playwright.dev/)
73
+ - [Rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer) visualize and analyze your Rollup bundle to see which modules are taking up space
74
+ - Predefined and fully typed global variables:
75
+ - `VITE_APP_VERSION` is read from `package.json` version at build time
76
+ - `VITE_APP_BUILD_EPOCH` is populated as `new Date().getTime()` at build time
77
+ - Github workflows (default)
78
+ - ci - on workflow call and dispatch
79
+ - deploy - on push main branch
80
+ - preview - on pull request
81
+ - Gitlab CI (use `--gitlab` command create project)
82
+ - run tests - on branches, merge request and manual
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-hook/create-app",
3
- "version": "0.2.4-alpha.3",
3
+ "version": "0.2.5",
4
4
  "description": "Scaffolding a basic typescript project",
5
5
  "type": "module",
6
6
  "license": "MIT",