Skip to content

Commit

Permalink
feat: convert command line parameters to interactive command line ♻️
Browse files Browse the repository at this point in the history
  • Loading branch information
wang1212 committed Jan 2, 2022
1 parent e1567f8 commit 99a9e5e
Show file tree
Hide file tree
Showing 11 changed files with 814 additions and 430 deletions.
4 changes: 2 additions & 2 deletions .commitlintrc.js → .commitlintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// see docs: https://commitlint.js.org/#/reference-configuration

module.exports = {
extends: ['@commitlint/config-conventional'],
}
extends: ['@commitlint/config-conventional'],
};
9 changes: 9 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# see docs: https://prettier.io/docs/en/configuration.html

# prettier config
printWidth: 160
tabWidth: 2
useTabs: false
singleQuote: true
semi: true
endOfLine: 'auto'
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## v0.6.4(2021-09-22)

- perf(templates): add `web-vitals` to collect performance information :sparkles: c776958
- perf(templates): add `web-vitals` to collect performance information :sparkles: c776958

https://github.com/wang1212/create-web-app/compare/v0.6.3...v0.6.4

## v0.6.3(2021-09-21)

- chore(templates): add a polyfill solution based on `core-js@3` :ambulance: 65e9521
- build(templates): remove `postcss-safe-parser` :wastebasket: 748882e
- chore(templates): add a polyfill solution based on `core-js@3` :ambulance: 65e9521
- build(templates): remove `postcss-safe-parser` :wastebasket: 748882e

https://github.com/wang1212/create-web-app/compare/v0.6.2...v0.6.3

Expand Down Expand Up @@ -169,8 +169,8 @@ View all dependent version update information https://github.com/wang1212/create

> **Deprecated [flow.js][0] and use [typescript][1] instead.**
[0]: https://flow.org/ "Flow: A Static Type Checker for JavaScript"
[1]: http://www.typescriptlang.org/ "TypeScript is a typed superset of JavaScript that compiles to plain JavaScript"
[0]: https://flow.org/ 'Flow: A Static Type Checker for JavaScript'
[1]: http://www.typescriptlang.org/ 'TypeScript is a typed superset of JavaScript that compiles to plain JavaScript'

- Add
- **@typescript-eslint/parser**
Expand Down
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,31 @@

English | [简体中文](./README.zh-CN.md)

:coffee: Create [PWA(Progressive Web App)](https://web.dev/progressive-web-apps/) project development environment startup configuration.

_**This package is now pure ESM, read https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c.**_

_**Starting with version `0.3.0`, [flow.js][0] will no longer be used, and [typescript][1] will be used instead.**_

[0]: https://flow.org/ 'Flow: A Static Type Checker for JavaScript'
[1]: http://www.typescriptlang.org/ 'TypeScript is a typed superset of JavaScript that compiles to plain JavaScript'

:coffee: Create [PWA(Progressive Web App)](https://web.dev/progressive-web-apps/) project development environment startup configuration.

## Content
## Template type

Support the following two:
Support the following types:

- create-web-app
- create-react-app(or [Official](https://create-react-app.dev/)
- javascript
- react.js(or [Official](https://create-react-app.dev/)

`create-web-app` builds a PWA that doesn't depend on any development framework, while `create-react-app` builds PWA based on React framework ecosystems such as React.js, Redux.js, and React Router.
`javascript` type builds a PWA that doesn't depend on any development framework, while `react.js` type builds PWA based on React framework ecosystems such as React.js, Redux.js, and React Router.

## Usage

- You don't need to install the package on your computer, you can use it and run:

```
npm init @wang1212/web-app [project_name]
npx @wang1212/create-web-app [project_name] // same as the previous line
```

or

```
npx --package @wang1212/create-web-app create-react-app [project_name] // built web app with react.js
npm init @wang1212/web-app
npx @wang1212/create-web-app // same as the previous line
```

- You can also install the package on your computer, use it to run:
Expand All @@ -47,17 +43,16 @@ npx --package @wang1212/create-web-app create-react-app [project_name] // built
npm install -g @wang1212/create-web-app
// now, use it to create a web app project
create-web-app [project_name] // built web app with no framework
create-react-app [project_name] // or, built web app with react.js
create-web-app
```

Note: `create-web-app` has an alias `create-pwa`, while `create-react-app` also has an alias `create-rpwa`.
Note: `create-web-app` has an alias `create-pwa`.

## Information
## Details

For more information, read `templates/*app/README.md` file contents.

## More
## Related

If you want to develop a node module package (library), maybe you can take a look:

Expand Down
37 changes: 16 additions & 21 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,31 @@

[English](./README.md) | 简体中文

:coffee: 创建 [PWA(Progressive Web App,渐进式 Web 应用)](https://web.dev/progressive-web-apps/) 项目开发环境启动配置。

_**这个包现在是纯 ESM,阅读 https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c.**_

_**`0.3.0` 版本开始, 不再使用 [flow.js][0], 用 [typescript][1] 作为替代。**_

[0]: https://flow.org/ 'Flow: A Static Type Checker for JavaScript'
[1]: http://www.typescriptlang.org/ 'TypeScript is a typed superset of JavaScript that compiles to plain JavaScript'

:coffee: 创建 [PWA(Progressive Web App,渐进式 Web 应用)](https://web.dev/progressive-web-apps/) 项目开发环境启动配置。

## 内容
## 模板类型

支持以下两种
支持以下类型

- create-web-app
- create-react-app(或者 [官方的](https://create-react-app.dev/)
- javascript
- react.js(或者 [官方的](https://create-react-app.dev/)

`create-web-app` 构建 PWA 不依赖于任何开发框架, 而 `create-react-app` 构建 PWA 则是基于 React.js 框架及其生态技术,例如 React.js, Redux.js, and React Router。
`javascript` 类型构建 PWA 不依赖于任何开发框架, 而 `react.js` 类型构建 PWA 则是基于 React.js 框架及其生态技术,例如 React.js, Redux.js, and React Router。

## 使用
## 用法

- 您无需在计算机上安装该软件包就可以使用它,运行:

```
npm init @wang1212/web-app [project_name]
npx @wang1212/create-web-app [project_name] // 与上一行相同
```

或者

```
npx --package @wang1212/create-web-app create-react-app [project_name] // 基于 react.js 构建 Web 应用
npm init @wang1212/web-app
npx @wang1212/create-web-app // 与上一行相同
```

- 您也可以在计算机上安装该软件包,然后运行:
Expand All @@ -47,17 +43,16 @@ npx --package @wang1212/create-web-app create-react-app [project_name] // 基于
npm install -g @wang1212/create-web-app
// 现在, 使用它创建一个 Web 应用项目
create-web-app [project_name] // 不基于任何框架开发 Web 应用
create-react-app [project_name] // 或者, 基于 react.js 开发 Web 应用
create-web-app
```

注意: `create-web-app` 有一个别名 `create-pwa`, 而且 `create-react-app` 也有一个别名 `create-rpwa`.
注意: `create-web-app` 有一个别名 `create-pwa`

## 信息
## 详细信息

更多信息, 阅读 `templates/*app/README.zh-CN.md` 文件的内容。

## 更多
## 相关的

如果你想开发一个 node 模块包(库),也许你可以看看:

Expand Down
85 changes: 0 additions & 85 deletions bin/create-react-app.js

This file was deleted.

Loading

0 comments on commit 99a9e5e

Please sign in to comment.