diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 717c0122..71021677 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,6 +5,7 @@ on: - master paths: - 'docs/**/**' + - 'package.json' jobs: build-and-deploy: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 4f935904..79b1b4b8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,6 @@ npm-debug.log /.changelog /packages/*/lib +/packages/*/es /packages/*/dist package-lock.json diff --git a/docs/README.md b/docs/README.md index 32b6fa76..9e43af8d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -52,7 +52,7 @@ npx @fesjs/create-fes-app myapp # 安装依赖 npm install -# 运行 +# 运行 npm run dev ``` diff --git a/package.json b/package.json index 3f6e957b..33493017 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,8 @@ "father-build": "^1.19.1", "husky": "^4.3.0", "lint-staged": "^10.4.0", + "postcss-loader": "^5.0.0", + "postcss": "^8.0.0", "vuepress": "^2.0.0-beta.22" }, "lint-staged": { diff --git a/packages/fes-runtime/.fatherrc.js b/packages/fes-runtime/.fatherrc.js index a199d7c0..4514926b 100644 --- a/packages/fes-runtime/.fatherrc.js +++ b/packages/fes-runtime/.fatherrc.js @@ -1,6 +1,6 @@ export default { target: 'browser', - cjs: { type: 'rollup', lazy: false }, - esm: { type: 'rollup' }, + cjs: { type: 'babel', lazy: false }, + esm: { type: 'babel' }, disableTypeCheck: false, }; diff --git a/packages/fes-runtime/package.json b/packages/fes-runtime/package.json index c2a7fa88..d2d2e648 100644 --- a/packages/fes-runtime/package.json +++ b/packages/fes-runtime/package.json @@ -2,9 +2,11 @@ "name": "@fesjs/runtime", "version": "2.0.0", "description": "@fesjs/runtime", - "main": "dist/index.js", + "main": "lib/index.js", + "module": "es/index.js", "files": [ - "dist" + "lib", + "es" ], "repository": { "type": "git", @@ -29,6 +31,5 @@ }, "dependencies": { "vue-router": "^4.0.1" - }, - "module": "dist/index.esm.js" + } } diff --git a/packages/fes/.fatherrc.js b/packages/fes/.fatherrc.js index 4c9e4c78..a28914fd 100644 --- a/packages/fes/.fatherrc.js +++ b/packages/fes/.fatherrc.js @@ -1,6 +1,5 @@ export default { cjs: { type: 'babel', lazy: false }, - esm: { type: 'rollup' }, - disableTypeCheck: false, - extraExternals: ['@@/core/exports'], + esm: { type: 'babel' }, + disableTypeCheck: false }; diff --git a/packages/fes/index.js b/packages/fes/index.js deleted file mode 100644 index 8778b01e..00000000 --- a/packages/fes/index.js +++ /dev/null @@ -1,5 +0,0 @@ - -module.exports = function () { - // TODO 模块导出 - console.log('Hello fes'); -}; diff --git a/packages/fes/package.json b/packages/fes/package.json index 5ec9320f..26046469 100644 --- a/packages/fes/package.json +++ b/packages/fes/package.json @@ -8,15 +8,15 @@ }, "files": [ "lib", - "dist", + "es", "bin", "types.d.ts" ], "bin": { "fes": "./bin/fes.js" }, - "main": "index.js", - "module": "dist/index.esm.js", + "main": "lib/index.js", + "module": "es/index.js", "author": "qlin", "repository": { "type": "git", diff --git a/yarn.lock b/yarn.lock index 07763343..c74dcc44 100644 --- a/yarn.lock +++ b/yarn.lock @@ -125,16 +125,6 @@ "@algolia/logger-common" "4.10.3" "@algolia/requester-common" "4.10.3" -"@ant-design-vue/use@^0.0.1-0": - version "0.0.1-alpha.10" - resolved "https://registry.yarnpkg.com/@ant-design-vue/use/-/use-0.0.1-alpha.10.tgz#14697ced4aa3e6d76a63008e87dbf6d3ef3e07da" - integrity sha512-og9a6Glx3X/8WHPasTTNRBPg+e5Jsp6J7gKH2dQ1/HDvMTYP/BCy08HrUfvTk9crkGc0kbxDmY+7M8KEtC80zw== - dependencies: - async-validator "^3.4.0" - lodash-es "^4.17.15" - resize-observer-polyfill "^1.5.1" - vue "^3.0.0" - "@ant-design/colors@^5.0.0": version "5.1.1" resolved "https://registry.yarnpkg.com/@ant-design/colors/-/colors-5.1.1.tgz#800b2186b1e27e66432e67d03ed96af3e21d8940" @@ -2038,14 +2028,6 @@ unique-filename "^1.1.1" which "^1.3.1" -"@fesjs/plugin-monaco-editor@^2.0.0-rc.0": - version "2.0.0-beta.1" - dependencies: - "@umijs/utils" "3.3.3" - lodash "^4.17.15" - monaco-editor "^0.20.0" - monaco-editor-webpack-plugin "^1.9.1" - "@hapi/address@^2.1.2": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -3905,9 +3887,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*", "@types/node@>= 8": - version "16.4.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.3.tgz#c01c1a215721f6dec71b47d88b4687463601ba48" - integrity sha512-GKM4FLMkWDc0sfx7tXqPWkM6NBow1kge0fgQh0bOnlqo4iT1kvTvMEKE0c1RtUGnbLlGRXiAA8SumE//90uKAg== + version "16.4.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.4.tgz#bb0744c1dcc1fc374f51d3fd41d028331a2420d4" + integrity sha512-BH/jX0HjzElFCQdAwaEMwuGBQwm6ViDZ00X6LKdnRRmGWOzkWugEH4+7a0BwfHQ8DfPPCSd/mdsm3Nu8FKFu0w== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -5046,24 +5028,22 @@ ansi-wrap@0.1.0, ansi-wrap@^0.1.0: resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= -ant-design-vue@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ant-design-vue/-/ant-design-vue-2.0.0.tgz#d30ec06938dc3b43b08a117818fab91d7b083e5f" - integrity sha512-Uv35Z9V+8iT1PBO0QOqWHaVE4Gju94UfikL8NGxtAqy/yZDnTn8K2gz5n7PfQbB5oBqkEyn2O0mtOpUBUEXZ+g== +ant-design-vue@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ant-design-vue/-/ant-design-vue-2.2.2.tgz#197388583c4e0b8ccd9c50ed19831ede27c2b919" + integrity sha512-Gmed9dVw4oqYmuO3ubkXbRBadldE82XSt6Gqq3F2grvORKXYoJF/3CaMwfyRN81UaoRhWVTHmLeGLzuVpwJepw== dependencies: - "@ant-design-vue/use" "^0.0.1-0" "@ant-design/icons-vue" "^6.0.0" "@babel/runtime" "^7.10.5" "@simonwep/pickr" "~1.8.0" array-tree-filter "^2.1.0" async-validator "^3.3.0" - dom-align "^1.10.4" + dom-align "^1.12.1" dom-scroll-into-view "^2.0.0" - is-mobile "^2.2.1" + lodash "^4.17.21" lodash-es "^4.17.15" moment "^2.27.0" omit.js "^2.0.0" - resize-observer-polyfill "^1.5.1" scroll-into-view-if-needed "^2.2.25" shallow-equal "^1.0.0" vue-types "^3.0.0" @@ -5279,7 +5259,7 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async-validator@^3.3.0, async-validator@^3.4.0: +async-validator@^3.3.0: version "3.5.2" resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-3.5.2.tgz#68e866a96824e8b2694ff7a831c1a25c44d5e500" integrity sha512-8eLCg00W9pIRZSB781UUX/H6Oskmm8xloZfr09lz5bikRpBVDlJ3hRVuxxP1SxcwsEYfJ4IU8Q19Y8/893r3rQ== @@ -7502,7 +7482,7 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-align@^1.10.4: +dom-align@^1.12.1: version "1.12.2" resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.12.2.tgz#0f8164ebd0c9c21b0c790310493cd855892acd4b" integrity sha512-pHuazgqrsTFrGU2WLDdXxCFabkdQDx72ddkraZNih1KsMcN5qsRSTR9O4VJRlwTPCPb5COYg3LOfiMHHcPInHg== @@ -7676,9 +7656,9 @@ ejs@^2.6.1: integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== electron-to-chromium@^1.3.723: - version "1.3.788" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.788.tgz#7a304c8ebb11d30916a1a1c1b4a9bad3983ef232" - integrity sha512-dbMIpX4E4/Gk4gzOh1GYS7ls1vGsByWKpIqLviJi1mSmSt5BvrWLLtSqpFE5BaC7Ef4NnI0GMaiddNX2Brw6zA== + version "1.3.789" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.789.tgz#c3ea060ba1e36e41c87943a47ed2daadc545be2b" + integrity sha512-lK4xn6C6ZF1kgLaC/EhOtC1MSKENExj3rMwGVnBTfHW81Z/Hb1Rge5YaWawN/YOXy3xCaESuE4KWSD50kOZ9rQ== emittery@^0.7.1: version "0.7.2" @@ -10238,11 +10218,6 @@ is-ip@^3.1.0: dependencies: ip-regex "^4.0.0" -is-mobile@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/is-mobile/-/is-mobile-2.2.2.tgz#f6c9c5d50ee01254ce05e739bdd835f1ed4e9954" - integrity sha512-wW/SXnYJkTjs++tVK5b6kVITZpAZPtUrt9SF80vvxGiF/Oywal+COk1jlRkiVq15RFNEQKQY31TkV24/1T5cVg== - is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" @@ -12038,22 +12013,17 @@ micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" -mime-db@1.48.0: - version "1.48.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d" - integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ== - -"mime-db@>= 1.43.0 < 2": +mime-db@1.49.0, "mime-db@>= 1.43.0 < 2": version "1.49.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.30, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.31" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b" - integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg== + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== dependencies: - mime-db "1.48.0" + mime-db "1.49.0" mime@1.6.0, mime@^1.4.1: version "1.6.0" @@ -13525,6 +13495,15 @@ postcss-loader@^4.2.0: schema-utils "^3.0.0" semver "^7.3.4" +postcss-loader@^5.0.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-5.3.0.tgz#1657f869e48d4fdb018a40771c235e499ee26244" + integrity sha512-/+Z1RAmssdiSLgIZwnJHwBMnlABPgF7giYzTN2NOfr9D21IJZ4mQC1R2miwp80zno9M4zMD/umGI8cR+2EL5zw== + dependencies: + cosmiconfig "^7.0.0" + klona "^2.0.4" + semver "^7.3.4" + postcss-loader@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-6.1.1.tgz#58dd0a3accd9bc87cc52eff75244db578d11301a" @@ -14041,7 +14020,7 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.16, postcss@^7.0.27: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.1.0, postcss@^8.1.10, postcss@^8.2.15, postcss@^8.3.5: +postcss@^8.0.0, postcss@^8.1.0, postcss@^8.1.10, postcss@^8.2.15, postcss@^8.3.5: version "8.3.6" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== @@ -14739,11 +14718,6 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= -resize-observer-polyfill@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" - integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== - resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -14962,9 +14936,9 @@ rollup@2.33.3: fsevents "~2.1.2" rollup@^2.43.1: - version "2.54.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.54.0.tgz#99ea816e8e9b1c6af3ab957a4e7a8f78dbd87773" - integrity sha512-RHzvstAVwm9A751NxWIbGPFXs3zL4qe/eYg+N7WwGtIXVLy1cK64MiU37+hXeFm1jqipK6DGgMi6Z2hhPuCC3A== + version "2.55.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.55.0.tgz#e23bb51194d9706b4661515a14feeefaaa1830c2" + integrity sha512-Atc3QqelKzrKwRkqnSdq0d2Mi8e0iGuL+kZebKMZ4ysyWHD5hw9VfVCAuODIW5837RENV8LXcbAEHurYf+ArvA== optionalDependencies: fsevents "~2.3.2" @@ -16992,9 +16966,9 @@ vinyl@^2.0.0, vinyl@^2.1.0: replace-ext "^1.0.0" vue-eslint-parser@^7.6.0, vue-eslint-parser@^7.9.0: - version "7.9.0" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.9.0.tgz#5eeedc71f22ebc7b18b957d1ab171acf29a41e64" - integrity sha512-QBlhZ5LteDRVy2dISfQhNEmmcqph+GTaD4SH41bYzXcVHFPJ9p34zCG6QAqOZVa8PKaVgbomFnoZpGJRZi14vg== + version "7.10.0" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.10.0.tgz#ea4e4b10fd10aa35c8a79ac783488d8abcd29be8" + integrity sha512-7tc/ewS9Vq9Bn741pvpg8op2fWJPH3k32aL+jcIcWGCTzh/zXSdh7pZ5FV3W2aJancP9+ftPAv292zY5T5IPCg== dependencies: debug "^4.1.1" eslint-scope "^5.1.1" @@ -17049,7 +17023,7 @@ vue-types@^3.0.0: dependencies: is-plain-object "3.0.1" -vue@^3.0.0, vue@^3.0.5, vue@^3.1.4: +vue@^3.0.5, vue@^3.1.4: version "3.1.5" resolved "https://registry.yarnpkg.com/vue/-/vue-3.1.5.tgz#12879b11d0685ee4478c8869551799630a52f9fe" integrity sha512-Ho7HNb1nfDoO+HVb6qYZgeaobt1XbY6KXFe4HGs1b9X6RhkWG/113n4/SrtM1LUclM6OrP/Se5aPHHvAPG1iVQ== @@ -17282,7 +17256,7 @@ webpack-sources@^1.1.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack-sources@^2.2.0, webpack-sources@^2.3.1: +webpack-sources@^2.2.0: version "2.3.1" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd" integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA== @@ -17290,10 +17264,15 @@ webpack-sources@^2.2.0, webpack-sources@^2.3.1: source-list-map "^2.0.1" source-map "^0.6.1" +webpack-sources@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.0.1.tgz#518cfabdbde3962f75bbecbacd11d88ab3205252" + integrity sha512-LkBxiXJ3tTuhLaS5gz6D6l77Et8mPWlghAe7bbnmi2PyN1CtkiL/YitR+I0pn9PtBC88Irqgg6F9dBJh8+sJRQ== + webpack@^5.24.2, webpack@^5.42.0: - version "5.46.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.46.0.tgz#105d20d96f79db59b316b0ae54316f0f630314b5" - integrity sha512-qxD0t/KTedJbpcXUmvMxY5PUvXDbF8LsThCzqomeGaDlCA6k998D8yYVwZMvO8sSM3BTEOaD4uzFniwpHaTIJw== + version "5.47.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.47.0.tgz#3c13862b5d7b428792bfe76c5f67a0f43ba685f8" + integrity sha512-soKLGwcUM1R3YEbJhJNiZzy7T43TnI7ENda/ywfDp9G1mDlDTpO+qfc8I5b0AzMr9xM3jyvQ0n7ctJyiXuXW6Q== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" @@ -17317,7 +17296,7 @@ webpack@^5.24.2, webpack@^5.42.0: tapable "^2.1.1" terser-webpack-plugin "^5.1.3" watchpack "^2.2.0" - webpack-sources "^2.3.1" + webpack-sources "^3.0.1" webpackbar@^5.0.0-3: version "5.0.0-3"