Browse Source

chore: add gitignore (#42101)

* chore: add gitignore

* chore: clean all

* chore: clean all

* chore: clean all

* chore: keep style

* chore: modify script

* chore: fix tsc
pull/42128/head
二货爱吃白萝卜 2 years ago
committed by GitHub
parent
commit
222811d582
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .gitignore
  2. 5
      components/version/index.tsx
  3. 1790
      components/version/token.tsx
  4. 1
      components/version/version.ts
  5. 1
      package.json
  6. 4
      scripts/generate-version.js

7
.gitignore

@ -59,8 +59,8 @@ site/theme/template/Resources/*.jsx
site/theme/template/Resources/**/*.jsx
site/theme/template/NotFound.jsx
scripts/previewEditor/index.html
components/version/version.tsx
components/version/token.tsx
components/version/
!components/version/style/index.tsx
.dumi
components/version/token-meta.json
components/version/token.json
@ -73,3 +73,6 @@ __image_snapshots__/
/imageDiffSnapshots
.devcontainer*
# From v5
locale/

5
components/version/index.tsx

@ -1,5 +0,0 @@
/* eslint import/no-unresolved: 0 */
// @ts-ignore
import version from './version';
export default version;

1790
components/version/token.tsx

File diff suppressed because it is too large

1
components/version/version.ts

@ -1 +0,0 @@
export default '5.2.2';

1
package.json

@ -61,6 +61,7 @@
"pretest": "npm run version",
"predist": "npm run version",
"presite": "npm run version",
"pretsc": "npm run version",
"compile": "npm run clean && antd-tools run compile",
"changelog": "node ./scripts/print-changelog",
"predeploy": "antd-tools run clean && npm run site && cp CNAME _site && npm run site:test",

4
scripts/generate-version.js

@ -3,8 +3,10 @@ const path = require('path');
const { version } = require('../package.json');
fs.ensureDirSync(path.join(__dirname, '..', 'components', 'version'));
fs.writeFileSync(
path.join(__dirname, '..', 'components', 'version', 'version.tsx'),
path.join(__dirname, '..', 'components', 'version', 'index.ts'),
`export default '${version}'`,
'utf8',
);

Loading…
Cancel
Save