@21epub/create-parcel-app 中文文档教程

发布于 3年前 浏览 26 项目主页 更新于 3年前

create-parcel-app

CLI 用于创建支持 Typescript 的节点 CLI 应用程序。

NPM构建状态JavaScript 风格指南

Intro

轻松创建包裹 ts 应用程序(包裹 1.x)。

适用于多种场景的 Parcel 应用程序:

  • Tiny app
  • Demo for test
  • Medium deployment (no complex data logic )
  • A single app solution for some project

易于发布和发布您的 CLI 应用程序。

Features

  • [x] Easy-to-use CLI
  • [x] Handles all modern JS features
  • [x] Babel for transpiling
  • [x] Jest + testing-library for testing.
  • [x] TypeScript Only
  • [x] Sourcemap creation
  • [x] lint-staged support
  • [X] Conventional commit by git-cz
  • [X] Format on Save ( Vscode Editor )
  • [X] Travis CI & Code coverage by custom configuration

Install globally

此包需要 node >= 10

npm install -g @21epub/create-parcel-app

Usage with npx ( Recommended )

运行前无需创建空文件夹。

npx @21epub/create-parcel-app

(npx 随 npm 5.2+ 及更高版本一起提供,请参阅 < a href="https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f">instructions for older npm versions)

Creating a New CLI APP

create-parcel-app

回答关于您的应用程序的一些基本提示,然后 CLI 将执行以下步骤:

  • copy over the template
  • install dependencies via yarn or npm
  • initialize local git repo

此时,您的新应用已准备就绪,并且已为本地开发做好了全部设置。

Development

现在,您可以随时继续开发

npm start # start bundle and watch your dev code  

For Proxy Server Development 在开始之前,在 scripts/proxy.config.json 中定制你的代理 api

npm run start:proxy

Commit 方法推荐

npm run commit # lint before commit can save your time , and then conventional commit with git-cz

Test

npm test

这会将你的模块的 commonjs 构建到 dist/ 然后发布你的模块到 npm。

License

麻省理工学院 © 21epub

create-parcel-app

CLI for creating node CLI app with Typescript support .

NPMBuild StatusJavaScript Style Guide

Intro

Easy to create a parcel ts app (parcel 1.x) .

Parcel app for several scenario :

  • Tiny app
  • Demo for test
  • Medium deployment (no complex data logic )
  • A single app solution for some project

Easy to Release and Publish your CLI app .

Features

  • [x] Easy-to-use CLI
  • [x] Handles all modern JS features
  • [x] Babel for transpiling
  • [x] Jest + testing-library for testing.
  • [x] TypeScript Only
  • [x] Sourcemap creation
  • [x] lint-staged support
  • [X] Conventional commit by git-cz
  • [X] Format on Save ( Vscode Editor )
  • [X] Travis CI & Code coverage by custom configuration

Install globally

This package requires node >= 10.

npm install -g @21epub/create-parcel-app

Usage with npx ( Recommended )

No need to create an empty folder before running.

npx @21epub/create-parcel-app

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

Creating a New CLI APP

create-parcel-app

Answer some basic prompts about your app, and then the CLI will perform the following steps:

  • copy over the template
  • install dependencies via yarn or npm
  • initialize local git repo

At this point, your new app is ready and is all setup for local development.

Development

Now, anytime you can keep on developing

npm start # start bundle and watch your dev code  

For Proxy Server Development Before start , customize your proxy api in scripts/proxy.config.json

npm run start:proxy

Commit Method Recommandation

npm run commit # lint before commit can save your time , and then conventional commit with git-cz

Test

npm test

This builds commonjs of your module to dist/ and then publishes your module to npm.

License

MIT © 21epub

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文