From 6301ddf76439be112e4e7e07e5a30a0b6d6a4757 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Fri, 28 Apr 2023 16:52:50 +0800 Subject: [PATCH] chore: Migrate CJS to ESM (#42062) * chore: Migrate CJS to ESM * fix * fix --- .github/workflows/test.yml | 3 --- package.json | 3 +-- scripts/check-demo.js | 14 -------------- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 scripts/check-demo.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76f053b7ec..3eb5482b89 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,9 +96,6 @@ jobs: with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: check demo - run: node ./scripts/check-demo.js needs: setup ################################ Dist ################################ diff --git a/package.json b/package.json index f540af6373..00700eb76c 100644 --- a/package.json +++ b/package.json @@ -294,8 +294,7 @@ "typescript": "~5.0.2", "vanilla-jsoneditor": "^0.17.1", "webpack-bundle-analyzer": "^4.1.0", - "xhr-mock": "^2.4.1", - "yaml-front-matter": "^4.0.0" + "xhr-mock": "^2.4.1" }, "peerDependencies": { "react": ">=16.9.0", diff --git a/scripts/check-demo.js b/scripts/check-demo.js deleted file mode 100644 index f8c0d5936a..0000000000 --- a/scripts/check-demo.js +++ /dev/null @@ -1,14 +0,0 @@ -const path = require('path'); -const yfm = require('yaml-front-matter'); -const { globSync } = require('glob'); -const fs = require('fs'); - -const demoFiles = globSync(path.join(process.cwd(), 'components/**/demo/*.md')); -// eslint-disable-next-line no-restricted-syntax -for (const url of demoFiles) { - const demoContent = fs.readFileSync(url); - const meta = yfm.loadFront(demoContent); - if (meta.only) { - throw Error(`there is a 'only': ${url}`); - } -}