From a900e375f267cee1793e9dd56d118a872c54535f Mon Sep 17 00:00:00 2001 From: zazzaz Date: Fri, 18 Sep 2020 16:15:30 +0800 Subject: [PATCH] chore: update readme (#325) --- README.md | 11 ++++++++--- package.json | 2 +- packages/locale/index.ts | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f9dc795de7..c8216ea8c8 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,18 @@ $ yarn bootstrap ``` the project will install all dependencies and run `lerna bootstrap` to initialize the project -## Storybook preview +## Website preview With command ```bash -$ yarn storybook +$ yarn website-dev ``` -the project will launch `@storybook` client for you to preview all existing component +the project will launch website for you to preview all existing component +You can also use this command to start a blank page to debug +```bash +$ yarn website-dev:play +//source file: ./website/play/index.vue +``` ## Component migration process 1. Convert the item in https://github.com/element-plus/element-plus/projects/1 to an issue 2. Assign yourself to the issue diff --git a/package.json b/package.json index 1c3ee7c43c..49c5556da0 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "lint": "eslint ./packages --ext .vue,.js,.ts", "website-build": "webpack --config ./website/webpack.config.js", "website-dev": "webpack-dev-server --config ./website/webpack.config.js", - "website-dev:play": "PLAY_ENV=true yarn website-dev" + "website-dev:play": "cross-env PLAY_ENV=true yarn website-dev" }, "peerDependencies": { "vue": "^3.0.0-rc.9" diff --git a/packages/locale/index.ts b/packages/locale/index.ts index b17b055797..bd56d3c6db 100644 --- a/packages/locale/index.ts +++ b/packages/locale/index.ts @@ -10,7 +10,7 @@ function template(str: string, option) { }) } -export const t = (path:string, option): string => { +export const t = (path:string, option?): string => { let value const array = path.split('.') let current = lang