套件
@master/create-css@master/create-css
Initialize a project with Master CSS
Usage
Create a config file
Initialize Master CSS in an existing project.
npm create @master/css@rcCreate a new app
Or you can specify an argument to create a new project, which by default uses the blank example.
npm create @master/css@rc my-appAPI Reference
create --ext esm
Specify creating a master.css.mjs file in ECMAScript Modules format. If package.json is set "type": "module" will be enabled automatically.
| Type | boolean |
|---|---|
| Default | auto |
npm create @master/css@rc --ext esmView the generated file
/** @type {import('@master/css').Config} */export default {}create --ext cjs
Specify creating a master.css.js file in CommonJS format.
| Type | boolean |
|---|---|
| Default | auto |
npm create @master/css@rc --ext cjsView the generated file
/** @type {import('@master/css').Config} */module.exports = {}create --ext ts
Specify creating a master.css.ts file in TypeScript format. Automatically enabled if tsconfig.json exists.
| Type | boolean |
|---|---|
| Default | auto |
npm create @master/css@rc --ext tsView the generated file
import type { Config } from '@master/css'export default {} as Configcreate --example
Create a Master CSS App using official examples.
| Type | string |
|---|---|
| Default | 'blank' |
npm create @master/css@rc project --example reactcreate --pm
Manually specify the package manager you are using.
| Type | string |
|---|---|
| Default | auto |
npm create @master/css@rc --pm buncreate -o, --override
Override the existing Master CSS config file.
| Type | boolean |
|---|---|
| Default | false |
npm create @master/css@rc --override