Skip to content

Commit

Permalink
chore: remove exist jsx demo file and generate when site build (#2976)
Browse files Browse the repository at this point in the history
* chore: remove exist jsx demo file and generate when site build

* chore: update snapshot
  • Loading branch information
uyarn authored Jul 3, 2024
1 parent 24ee77e commit c7c70ae
Show file tree
Hide file tree
Showing 612 changed files with 6,809 additions and 34,272 deletions.
3 changes: 3 additions & 0 deletions babel.config.demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@babel/preset-typescript'],
};
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@
"init": "git submodule init && git submodule update",
"start": "cd site && vite",
"dev": "cd site && vite",
"site": "cd site && vite build",
"site:intranet": "cd site && vite build --mode intranet",
"site:preview": "cd site && vite build --mode preview",
"site": "npm run build:jsx-demo && cd site && vite build",
"site:intranet": "npm run build:jsx-demo && cd site && vite build --mode intranet",
"site:preview": "npm run build:jsx-demo && cd site && vite build --mode preview",
"postsite:preview": "cp _site/index.html _site/404.html",
"lint": "npm run lint:tsc && eslint --ext .ts,.tsx ./ --max-warnings 0",
"lint:fix": "eslint --ext .ts,.tsx ./src --ignore-pattern src/__tests__ --max-warnings 0 --fix",
"lint:tsc": "tsc -p ./tsconfig.dev.json ",
"generate:usage": "node script/generate-usage/index.js",
"generate:coverage-badge": "npm run test:coverage && node script/generate-coverage.js",
"generate:jsx-demo":"npx babel src/**/_example --extensions '.tsx' --config-file ./babel.config.demo.js --relative --out-dir ../_example-js --out-file-extension=.jsx",
"format:jsx-demo": "npx eslint src/**/_example-js/*.jsx --fix && npx prettier --write src/**/_example-js/*.jsx",
"test": "vitest run && npm run test:snap",
"test:ui": "vitest --ui",
"test:snap": "cross-env NODE_ENV=test-snap vitest run",
Expand All @@ -59,6 +61,7 @@
"build:tsc-esm": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir esm/",
"build:tsc-cjs": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir cjs/",
"build:tsc-lib": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir lib/",
"build:jsx-demo":"npm run generate:jsx-demo && npm run format:jsx-demo",
"changelog": "node script/generate-changelog.js",
"init:component": "node script/init-component",
"robot": "publish-cli robot-msg",
Expand Down Expand Up @@ -97,6 +100,7 @@
"react-popper": "~2.3.0"
},
"devDependencies": {
"@babel/cli": "^7.24.7",
"@babel/core": "^7.16.5",
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/plugin-transform-typescript": "^7.18.10",
Expand Down
2 changes: 1 addition & 1 deletion src/_common
16 changes: 0 additions & 16 deletions src/affix/_example-js/base.jsx

This file was deleted.

59 changes: 0 additions & 59 deletions src/affix/_example-js/container.jsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/alert/_example-js/base.jsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/alert/_example-js/close.jsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/alert/_example-js/collapse.jsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/alert/_example-js/icon.jsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/alert/_example-js/operation.jsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/alert/_example-js/swiper.jsx

This file was deleted.

14 changes: 0 additions & 14 deletions src/alert/_example-js/title.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions src/anchor/_example-js/base.jsx

This file was deleted.

44 changes: 0 additions & 44 deletions src/anchor/_example-js/container.jsx

This file was deleted.

30 changes: 0 additions & 30 deletions src/anchor/_example-js/cursor.jsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/anchor/_example-js/customize-highlight.jsx

This file was deleted.

20 changes: 0 additions & 20 deletions src/anchor/_example-js/large.jsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/anchor/_example-js/multiple.jsx

This file was deleted.

Loading

0 comments on commit c7c70ae

Please sign in to comment.