diff --git a/package-lock.json b/package-lock.json index 88a963353..a30156880 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,9 @@ "primeflex": "^3.2.1", "primeicons": "^5.0.0", "prismjs": "^1.29.0", + "rollup-plugin-postcss": "^4.0.0", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-vue": "^6.0.0-beta.9", "sass": "^1.45.0", "sass-loader": "^8.0.2" } @@ -2597,6 +2600,24 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/concat-with-sourcemaps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/consola": { "version": "2.15.3", "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", @@ -3972,6 +3993,24 @@ "node": ">=8" } }, + "node_modules/generic-names": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-4.0.0.tgz", + "integrity": "sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==", + "dev": true, + "dependencies": { + "loader-utils": "^3.2.0" + } + }, + "node_modules/generic-names/node_modules/loader-utils": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz", + "integrity": "sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==", + "dev": true, + "engines": { + "node": ">= 12.13.0" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -4277,6 +4316,24 @@ "node": ">=0.10.0" } }, + "node_modules/icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==", + "dev": true + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -4312,6 +4369,30 @@ "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", "dev": true }, + "node_modules/import-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz", + "integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==", + "dev": true, + "dependencies": { + "import-from": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4840,6 +4921,12 @@ "integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==", "dev": true }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -5643,6 +5730,43 @@ "node": ">=0.10.0" } }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", + "dev": true, + "dependencies": { + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/parse-git-config": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/parse-git-config/-/parse-git-config-3.0.0.tgz", @@ -5934,6 +6058,35 @@ "node": ">=6" } }, + "node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, "node_modules/postcss-merge-longhand": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", @@ -6032,6 +6185,84 @@ "postcss": "^8.2.15" } }, + "node_modules/postcss-modules": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.3.1.tgz", + "integrity": "sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==", + "dev": true, + "dependencies": { + "generic-names": "^4.0.0", + "icss-replace-symbols": "^1.1.0", + "lodash.camelcase": "^4.3.0", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "string-hash": "^1.1.1" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, "node_modules/postcss-normalize-charset": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", @@ -6366,6 +6597,15 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "node_modules/promise.series": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/promise.series/-/promise.series-0.2.0.tgz", + "integrity": "sha512-VWQJyU2bcDTgZw8kpfBpB/ejZASlCrzwz5f2hjb/zlujOEB4oeiAhHygAWq8ubsX2GVkD4kCU5V2dwOTaCY5EQ==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, "node_modules/protocols": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz", @@ -6625,6 +6865,94 @@ "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-postcss": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.2.tgz", + "integrity": "sha512-05EaY6zvZdmvPUDi3uCcAQoESDcYnv8ogJJQRp6V5kZ6J6P7uAVJlrTZcaaA20wTH527YTnKfkAoPxWI/jPp4w==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "concat-with-sourcemaps": "^1.1.0", + "cssnano": "^5.0.1", + "import-cwd": "^3.0.0", + "p-queue": "^6.6.2", + "pify": "^5.0.0", + "postcss-load-config": "^3.0.0", + "postcss-modules": "^4.0.0", + "promise.series": "^0.2.0", + "resolve": "^1.19.0", + "rollup-pluginutils": "^2.8.2", + "safe-identifier": "^0.4.2", + "style-inject": "^0.3.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "postcss": "8.x" + } + }, + "node_modules/rollup-plugin-postcss/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/rollup-plugin-postcss/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/rollup-plugin-postcss/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/rollup-plugin-postcss/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/rollup-plugin-postcss/node_modules/pify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/rollup-plugin-terser": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", @@ -6678,6 +7006,20 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/rollup-plugin-vue": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0.tgz", + "integrity": "sha512-oVvUd84d5u73M2HYM3XsMDLtZRIA/tw2U0dmHlXU2UWP5JARYHzh/U9vcxaN/x/9MrepY7VH3pHFeOhrWpxs/Q==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "hash-sum": "^2.0.0", + "rollup-pluginutils": "^2.8.2" + }, + "peerDependencies": { + "@vue/compiler-sfc": "*" + } + }, "node_modules/rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -6740,6 +7082,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/safe-identifier": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", + "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==", + "dev": true + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7113,6 +7461,12 @@ } ] }, + "node_modules/string-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", + "integrity": "sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==", + "dev": true + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -7166,6 +7520,12 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/style-inject": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz", + "integrity": "sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw==", + "dev": true + }, "node_modules/stylehacks": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", @@ -10830,6 +11190,23 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "consola": { "version": "2.15.3", "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", @@ -11769,6 +12146,23 @@ } } }, + "generic-names": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-4.0.0.tgz", + "integrity": "sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==", + "dev": true, + "requires": { + "loader-utils": "^3.2.0" + }, + "dependencies": { + "loader-utils": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz", + "integrity": "sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==", + "dev": true + } + } + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -12001,6 +12395,19 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==", + "dev": true + }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "requires": {} + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -12019,6 +12426,24 @@ "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", "dev": true }, + "import-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz", + "integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==", + "dev": true, + "requires": { + "import-from": "^3.0.0" + } + }, + "import-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -12424,6 +12849,12 @@ "integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==", "dev": true }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -13066,6 +13497,31 @@ "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "dev": true + }, + "p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" + } + }, + "p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, "parse-git-config": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/parse-git-config/-/parse-git-config-3.0.0.tgz", @@ -13283,6 +13739,16 @@ } } }, + "postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "requires": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + } + }, "postcss-merge-longhand": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", @@ -13345,6 +13811,58 @@ "postcss-selector-parser": "^6.0.5" } }, + "postcss-modules": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.3.1.tgz", + "integrity": "sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==", + "dev": true, + "requires": { + "generic-names": "^4.0.0", + "icss-replace-symbols": "^1.1.0", + "lodash.camelcase": "^4.3.0", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "string-hash": "^1.1.1" + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "requires": {} + }, + "postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0" + } + }, "postcss-normalize-charset": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", @@ -13555,6 +14073,12 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "promise.series": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/promise.series/-/promise.series-0.2.0.tgz", + "integrity": "sha512-VWQJyU2bcDTgZw8kpfBpB/ejZASlCrzwz5f2hjb/zlujOEB4oeiAhHygAWq8ubsX2GVkD4kCU5V2dwOTaCY5EQ==", + "dev": true + }, "protocols": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz", @@ -13747,6 +14271,69 @@ "fsevents": "~2.3.2" } }, + "rollup-plugin-postcss": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.2.tgz", + "integrity": "sha512-05EaY6zvZdmvPUDi3uCcAQoESDcYnv8ogJJQRp6V5kZ6J6P7uAVJlrTZcaaA20wTH527YTnKfkAoPxWI/jPp4w==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "concat-with-sourcemaps": "^1.1.0", + "cssnano": "^5.0.1", + "import-cwd": "^3.0.0", + "p-queue": "^6.6.2", + "pify": "^5.0.0", + "postcss-load-config": "^3.0.0", + "postcss-modules": "^4.0.0", + "promise.series": "^0.2.0", + "resolve": "^1.19.0", + "rollup-pluginutils": "^2.8.2", + "safe-identifier": "^0.4.2", + "style-inject": "^0.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "pify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", + "dev": true + } + } + }, "rollup-plugin-terser": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", @@ -13779,6 +14366,17 @@ } } }, + "rollup-plugin-vue": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0.tgz", + "integrity": "sha512-oVvUd84d5u73M2HYM3XsMDLtZRIA/tw2U0dmHlXU2UWP5JARYHzh/U9vcxaN/x/9MrepY7VH3pHFeOhrWpxs/Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "hash-sum": "^2.0.0", + "rollup-pluginutils": "^2.8.2" + } + }, "rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -13826,6 +14424,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "safe-identifier": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", + "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==", + "dev": true + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -14106,6 +14710,12 @@ } } }, + "string-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", + "integrity": "sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==", + "dev": true + }, "string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -14141,6 +14751,12 @@ "acorn": "^8.7.1" } }, + "style-inject": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz", + "integrity": "sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw==", + "dev": true + }, "stylehacks": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", diff --git a/package.json b/package.json index 7a2c2d925..c9bb425f7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "dev": "nuxt dev", "generate": "nuxt generate", "preview": "nuxt preview", - "postinstall": "nuxt prepare" + "postinstall": "nuxt prepare", + "testRollup":"rollup -c" }, "devDependencies": { "@fullcalendar/core": "^5.7.2", @@ -22,6 +23,9 @@ "sass": "^1.45.0", "sass-loader": "^8.0.2", "@vuelidate/core": "^2.0.0-alpha.14", - "@vuelidate/validators": "^2.0.0-alpha.12" + "@vuelidate/validators": "^2.0.0-alpha.12", + "rollup-plugin-postcss": "^4.0.0", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-vue": "^6.0.0-beta.9" } } diff --git a/pages/megamenu/MegaMenuDemo.vue b/pages/megamenu/index.vue similarity index 100% rename from pages/megamenu/MegaMenuDemo.vue rename to pages/megamenu/index.vue diff --git a/pages/menu/MenuDemo.vue b/pages/menu/index.vue similarity index 100% rename from pages/menu/MenuDemo.vue rename to pages/menu/index.vue diff --git a/pages/menubar/MenubarDemo.vue b/pages/menubar/index.vue similarity index 100% rename from pages/menubar/MenubarDemo.vue rename to pages/menubar/index.vue diff --git a/pages/message/MessageDemo.vue b/pages/message/index.vue similarity index 100% rename from pages/message/MessageDemo.vue rename to pages/message/index.vue diff --git a/pages/multiselect/MultiSelectDemo.vue b/pages/multiselect/index.vue similarity index 100% rename from pages/multiselect/MultiSelectDemo.vue rename to pages/multiselect/index.vue diff --git a/pages/orderlist/OrderListDemo.vue b/pages/orderlist/index.vue similarity index 100% rename from pages/orderlist/OrderListDemo.vue rename to pages/orderlist/index.vue diff --git a/pages/organizationchart/OrganizationChartDemo.vue b/pages/organizationchart/index.vue similarity index 100% rename from pages/organizationchart/OrganizationChartDemo.vue rename to pages/organizationchart/index.vue diff --git a/pages/overlaypanel/OverlayPanelDemo.vue b/pages/overlaypanel/index.vue similarity index 100% rename from pages/overlaypanel/OverlayPanelDemo.vue rename to pages/overlaypanel/index.vue diff --git a/pages/paginator/PaginatorDemo.vue b/pages/paginator/index.vue similarity index 100% rename from pages/paginator/PaginatorDemo.vue rename to pages/paginator/index.vue diff --git a/pages/panel/PanelDemo.vue b/pages/panel/index.vue similarity index 100% rename from pages/panel/PanelDemo.vue rename to pages/panel/index.vue diff --git a/pages/panelmenu/PanelMenuDemo.vue b/pages/panelmenu/index.vue similarity index 100% rename from pages/panelmenu/PanelMenuDemo.vue rename to pages/panelmenu/index.vue diff --git a/pages/password/PasswordDemo.vue b/pages/password/index.vue similarity index 100% rename from pages/password/PasswordDemo.vue rename to pages/password/index.vue diff --git a/pages/picklist/PickListDemo.vue b/pages/picklist/index.vue similarity index 100% rename from pages/picklist/PickListDemo.vue rename to pages/picklist/index.vue diff --git a/pages/progressbar/ProgressBarDemo.vue b/pages/progressbar/index.vue similarity index 100% rename from pages/progressbar/ProgressBarDemo.vue rename to pages/progressbar/index.vue diff --git a/pages/progressspinner/ProgressSpinnerDemo.vue b/pages/progressspinner/index.vue similarity index 100% rename from pages/progressspinner/ProgressSpinnerDemo.vue rename to pages/progressspinner/index.vue diff --git a/pages/radiobutton/RadioButtonDemo.vue b/pages/radiobutton/index.vue similarity index 100% rename from pages/radiobutton/RadioButtonDemo.vue rename to pages/radiobutton/index.vue diff --git a/pages/rating/RatingDemo.vue b/pages/rating/index.vue similarity index 100% rename from pages/rating/RatingDemo.vue rename to pages/rating/index.vue diff --git a/pages/responsive/ResponsiveDemo.vue b/pages/responsive/index.vue similarity index 100% rename from pages/responsive/ResponsiveDemo.vue rename to pages/responsive/index.vue diff --git a/pages/ripple/RippleDemo.vue b/pages/ripple/index.vue similarity index 100% rename from pages/ripple/RippleDemo.vue rename to pages/ripple/index.vue diff --git a/pages/scrollpanel/ScrollPanelDemo.vue b/pages/scrollpanel/index.vue similarity index 100% rename from pages/scrollpanel/ScrollPanelDemo.vue rename to pages/scrollpanel/index.vue diff --git a/pages/scrolltop/ScrollTopDemo.vue b/pages/scrolltop/index.vue similarity index 100% rename from pages/scrolltop/ScrollTopDemo.vue rename to pages/scrolltop/index.vue diff --git a/pages/selectbutton/SelectButtonDemo.vue b/pages/selectbutton/index.vue similarity index 100% rename from pages/selectbutton/SelectButtonDemo.vue rename to pages/selectbutton/index.vue diff --git a/pages/sidebar/SidebarDemo.vue b/pages/sidebar/index.vue similarity index 100% rename from pages/sidebar/SidebarDemo.vue rename to pages/sidebar/index.vue diff --git a/pages/skeleton/SkeletonDemo.vue b/pages/skeleton/index.vue similarity index 100% rename from pages/skeleton/SkeletonDemo.vue rename to pages/skeleton/index.vue diff --git a/pages/slider/SliderDemo.vue b/pages/slider/index.vue similarity index 100% rename from pages/slider/SliderDemo.vue rename to pages/slider/index.vue diff --git a/pages/speeddial/SpeedDialDemo.vue b/pages/speeddial/index.vue similarity index 100% rename from pages/speeddial/SpeedDialDemo.vue rename to pages/speeddial/index.vue diff --git a/pages/splitbutton/SplitButtonDemo.vue b/pages/splitbutton/index.vue similarity index 100% rename from pages/splitbutton/SplitButtonDemo.vue rename to pages/splitbutton/index.vue diff --git a/pages/splitter/SplitterDemo.vue b/pages/splitter/index.vue similarity index 100% rename from pages/splitter/SplitterDemo.vue rename to pages/splitter/index.vue diff --git a/pages/styleclass/StyleClassDemo.vue b/pages/styleclass/index.vue similarity index 100% rename from pages/styleclass/StyleClassDemo.vue rename to pages/styleclass/index.vue diff --git a/pages/tabview/TabViewDemo.vue b/pages/tabview/index.vue similarity index 100% rename from pages/tabview/TabViewDemo.vue rename to pages/tabview/index.vue diff --git a/pages/tag/TagDemo.vue b/pages/tag/index.vue similarity index 100% rename from pages/tag/TagDemo.vue rename to pages/tag/index.vue diff --git a/pages/terminal/TerminalDemo.vue b/pages/terminal/index.vue similarity index 100% rename from pages/terminal/TerminalDemo.vue rename to pages/terminal/index.vue diff --git a/pages/textarea/TextareaDemo.vue b/pages/textarea/index.vue similarity index 100% rename from pages/textarea/TextareaDemo.vue rename to pages/textarea/index.vue diff --git a/pages/tieredmenu/TieredMenuDemo.vue b/pages/tieredmenu/index.vue similarity index 100% rename from pages/tieredmenu/TieredMenuDemo.vue rename to pages/tieredmenu/index.vue diff --git a/pages/timeline/TimelineDemo.vue b/pages/timeline/index.vue similarity index 100% rename from pages/timeline/TimelineDemo.vue rename to pages/timeline/index.vue diff --git a/pages/toast/ToastDemo.vue b/pages/toast/index.vue similarity index 100% rename from pages/toast/ToastDemo.vue rename to pages/toast/index.vue diff --git a/pages/togglebutton/ToggleButtonDemo.vue b/pages/togglebutton/index.vue similarity index 100% rename from pages/togglebutton/ToggleButtonDemo.vue rename to pages/togglebutton/index.vue diff --git a/pages/toolbar/ToolbarDemo.vue b/pages/toolbar/index.vue similarity index 100% rename from pages/toolbar/ToolbarDemo.vue rename to pages/toolbar/index.vue diff --git a/pages/tooltip/TooltipDemo.vue b/pages/tooltip/index.vue similarity index 100% rename from pages/tooltip/TooltipDemo.vue rename to pages/tooltip/index.vue diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 000000000..78c564530 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,192 @@ +import postcss from 'rollup-plugin-postcss'; +import { terser } from 'rollup-plugin-terser'; +import vue from 'rollup-plugin-vue'; + +const fs = require('fs-extra'); +const path = require('path'); + +let entries = []; + +let core = {}; + +let coreDependencies = { + 'primevue/utils': 'primevue.utils', + 'primevue/api': 'primevue.api', + 'primevue/config': 'primevue.config', + 'primevue/ripple': 'primevue.ripple', + 'primevue/portal': 'primevue.portal', + 'primevue/tooltip': 'primevue.tooltip', + 'primevue/virtualscroller': 'primevue.virtualscroller', + 'primevue/confirmationeventbus': 'primevue.confirmationeventbus', + 'primevue/toasteventbus': 'primevue.toasteventbus', + 'primevue/overlayeventbus': 'primevue.overlayeventbus', + 'primevue/dynamicdialogeventbus': 'primevue.dynamicdialogeventbus', + 'primevue/terminalservice': 'primevue.terminalservice', + 'primevue/useconfirm': 'primevue.useconfirm', + 'primevue/usetoast': 'primevue.usetoast', + 'primevue/usedialog': 'primevue.usedialog', + 'primevue/button': 'primevue.button', + 'primevue/inputtext': 'primevue.inputtext', + 'primevue/inputnumber': 'primevue.inputnumber', + 'primevue/message': 'primevue.message', + 'primevue/progressbar': 'primevue.progressbar', + 'primevue/dropdown': 'primevue.dropdown', + 'primevue/dialog': 'primevue.dialog', + 'primevue/paginator': 'primevue.paginator', + 'primevue/tree': 'primevue.tree', + 'primevue/menu': 'primevue.menu', + 'primevue/tieredmenu': 'primevue.tieredmenu' +}; + +let globalDependencies = { + vue: 'Vue', + '@fullcalendar/core': 'FullCalendar', + ...coreDependencies +}; + +function addEntry(folder, inFile, outFile) { + let useCorePlugin = Object.keys(coreDependencies).some((d) => d.replace('primevue/', '') === outFile); + + entries.push({ + input: 'components/' + folder + '/' + inFile, + output: [ + { + format: 'cjs', + file: 'dist/' + folder + '/' + outFile + '.cjs.js' + }, + { + format: 'esm', + file: 'dist/' + folder + '/' + outFile + '.esm.js' + }, + { + format: 'iife', + name: 'primevue.' + folder, + file: 'dist/' + folder + '/' + outFile + '.js', + globals: globalDependencies + } + ], + plugins: [vue(), postcss(), useCorePlugin && corePlugin()] + }); + + entries.push({ + input: 'components/' + folder + '/' + inFile, + output: [ + { + format: 'cjs', + file: 'dist/' + folder + '/' + outFile + '.cjs.min.js' + }, + { + format: 'esm', + file: 'dist/' + folder + '/' + outFile + '.esm.min.js' + }, + { + format: 'iife', + name: 'primevue.' + folder, + file: 'dist/' + folder + '/' + outFile + '.min.js', + globals: globalDependencies + } + ], + plugins: [vue(), postcss(), terser(), useCorePlugin && corePlugin()] + }); +} + +function corePlugin() { + return { + name: 'corePlugin', + generateBundle(outputOptions, bundle) { + if (outputOptions.format === 'iife') { + Object.keys(bundle).forEach((id) => { + const chunk = bundle[id]; + const name = id.replace('.min.js', '').replace('.js', ''); + const filePath = `./dist/core/core${id.indexOf('.min.js') > 0 ? '.min.js' : '.js'}`; + + core[filePath] ? (core[filePath][name] = chunk.code) : (core[filePath] = { [`${name}`]: chunk.code }); + }); + } + } + }; +} + +function addCore() { + const lastEntry = entries[entries.length - 1]; + + lastEntry.plugins = [ + ...lastEntry.plugins, + { + name: 'coreMergePlugin', + generateBundle() { + Object.entries(core).forEach(([filePath, value]) => { + const code = Object.keys(coreDependencies).reduce((val, d) => { + const name = d.replace('primevue/', ''); + val += value[name] + '\n'; + + return val; + }, ''); + + fs.outputFile(path.resolve(__dirname, filePath), code, {}, function (err) { + if (err) { + // eslint-disable-next-line no-console + return console.error(err); + } + }); + }); + } + } + ]; +} + +function addSFC() { + fs.readdirSync(path.resolve(__dirname, './components'), { withFileTypes: true }) + .filter((dir) => dir.isDirectory()) + .forEach(({ name: folderName }) => { + fs.readdirSync(path.resolve(__dirname, './components/' + folderName)).forEach((file) => { + let name = file.split(/(.vue)$|(.js)$/)[0].toLowerCase(); + if (/\.vue$/.test(file) && name === folderName) { + addEntry(folderName, file, name); + } + }); + }); +} + +function addDirectives() { + addEntry('badgedirective', 'BadgeDirective.js', 'badgedirective'); + addEntry('ripple', 'Ripple.js', 'ripple'); + addEntry('tooltip', 'Tooltip.js', 'tooltip'); + addEntry('styleclass', 'StyleClass.js', 'styleclass'); +} + +function addConfig() { + addEntry('config', 'PrimeVue.js', 'config'); +} + +function addUtils() { + addEntry('utils', 'Utils.js', 'utils'); +} + +function addApi() { + addEntry('api', 'Api.js', 'api'); +} + +function addServices() { + addEntry('confirmationservice', 'ConfirmationService.js', 'confirmationservice'); + addEntry('confirmationeventbus', 'ConfirmationEventBus.js', 'confirmationeventbus'); + addEntry('useconfirm', 'UseConfirm.js', 'useconfirm'); + addEntry('toastservice', 'ToastService.js', 'toastservice'); + addEntry('toasteventbus', 'ToastEventBus.js', 'toasteventbus'); + addEntry('overlayeventbus', 'OverlayEventBus.js', 'overlayeventbus'); + addEntry('usetoast', 'UseToast.js', 'usetoast'); + addEntry('terminalservice', 'TerminalService.js', 'terminalservice'); + addEntry('usedialog', 'UseDialog.js', 'usedialog'); + addEntry('dialogservice', 'DialogService.js', 'dialogservice'); + addEntry('dynamicdialogeventbus', 'DynamicDialogEventBus.js', 'dynamicdialogeventbus'); +} + +addUtils(); +addApi(); +addConfig(); +addDirectives(); +addServices(); +addSFC(); +addCore(); + +export default entries;