mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
build(scripts): publish examples using gh-pages
This commit is contained in:
parent
efbb61b646
commit
a85dade8ff
3 changed files with 163 additions and 11 deletions
15
package.json
15
package.json
|
@ -21,6 +21,7 @@
|
|||
"devDependencies": {
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"@carbon/themes": "^10.18.0",
|
||||
"@rollup/plugin-commonjs": "^15.0.0",
|
||||
"@rollup/plugin-node-resolve": "^9.0.0",
|
||||
"@storybook/addon-knobs": "^5.3.19",
|
||||
|
@ -28,8 +29,14 @@
|
|||
"@storybook/cli": "^5.3.19",
|
||||
"@storybook/svelte": "^5.3.19",
|
||||
"@tsconfig/svelte": "^1.0.10",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"babel-loader": "^8.0.6",
|
||||
"carbon-components-10.18": "npm:carbon-components@10.18",
|
||||
"carbon-components-10.19": "npm:carbon-components@10.19",
|
||||
"comment-parser": "^0.7.5",
|
||||
"gh-pages": "^3.1.0",
|
||||
"node-sass": "^4.14.1",
|
||||
"postcss": "^7.0.32",
|
||||
"prettier": "^2.1.1",
|
||||
"prettier-plugin-svelte": "^1.2.1",
|
||||
"rollup": "^2.26.10",
|
||||
|
@ -37,13 +44,7 @@
|
|||
"rollup-plugin-terser": "^7.0.2",
|
||||
"svelte": "^3.24.1",
|
||||
"svelte-loader": "^2.13.6",
|
||||
"typescript": "^4.0.2",
|
||||
"@carbon/themes": "^10.18.0",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"carbon-components-10.18": "npm:carbon-components@10.18",
|
||||
"carbon-components-10.19": "npm:carbon-components@10.19",
|
||||
"node-sass": "^4.14.1",
|
||||
"postcss": "^7.0.32"
|
||||
"typescript": "^4.0.2"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
|
|
31
scripts/publish-examples.js
Normal file
31
scripts/publish-examples.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const ghpages = require("gh-pages");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { promisify } = require("util");
|
||||
|
||||
const ghPublish = promisify(ghpages.publish);
|
||||
|
||||
async function publishExample(name) {
|
||||
try {
|
||||
const folder_path = path.join("examples", name);
|
||||
await ghPublish(folder_path, {
|
||||
branch: name,
|
||||
dotfiles: true,
|
||||
history: false,
|
||||
});
|
||||
console.log("Published example:", name);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
(async () => {
|
||||
ghpages.clean();
|
||||
|
||||
await publishExample("rollup");
|
||||
await publishExample("rollup-typescript");
|
||||
await publishExample("routify");
|
||||
await publishExample("sapper");
|
||||
await publishExample("svite");
|
||||
await publishExample("webpack");
|
||||
})();
|
128
yarn.lock
128
yarn.lock
|
@ -2338,6 +2338,13 @@ async-foreach@^0.1.3:
|
|||
resolved "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542"
|
||||
integrity sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=
|
||||
|
||||
async@^2.6.1:
|
||||
version "2.6.3"
|
||||
resolved "https://registry.npmjs.org/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
|
||||
integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
|
||||
dependencies:
|
||||
lodash "^4.17.14"
|
||||
|
||||
asynckit@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
||||
|
@ -3519,7 +3526,7 @@ comma-separated-tokens@^1.0.0:
|
|||
resolved "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea"
|
||||
integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==
|
||||
|
||||
commander@^2.20.0:
|
||||
commander@^2.18.0, commander@^2.20.0:
|
||||
version "2.20.3"
|
||||
resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
||||
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
|
||||
|
@ -4245,6 +4252,11 @@ elliptic@^6.0.0, elliptic@^6.5.2:
|
|||
minimalistic-assert "^1.0.0"
|
||||
minimalistic-crypto-utils "^1.0.0"
|
||||
|
||||
email-addresses@^3.0.1:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb"
|
||||
integrity sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==
|
||||
|
||||
emoji-regex@^7.0.1:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
|
||||
|
@ -4725,6 +4737,28 @@ file-uri-to-path@1.0.0:
|
|||
resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
|
||||
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
|
||||
|
||||
filename-reserved-regex@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4"
|
||||
integrity sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=
|
||||
|
||||
filenamify-url@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz#b32bd81319ef5863b73078bed50f46a4f7975f50"
|
||||
integrity sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=
|
||||
dependencies:
|
||||
filenamify "^1.0.0"
|
||||
humanize-url "^1.0.0"
|
||||
|
||||
filenamify@^1.0.0:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5"
|
||||
integrity sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=
|
||||
dependencies:
|
||||
filename-reserved-regex "^1.0.0"
|
||||
strip-outer "^1.0.0"
|
||||
trim-repeated "^1.0.0"
|
||||
|
||||
filesize@3.6.1:
|
||||
version "3.6.1"
|
||||
resolved "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317"
|
||||
|
@ -4920,7 +4954,7 @@ fs-extra@^0.30.0:
|
|||
path-is-absolute "^1.0.0"
|
||||
rimraf "^2.2.8"
|
||||
|
||||
fs-extra@^8.0.1:
|
||||
fs-extra@^8.0.1, fs-extra@^8.1.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
|
||||
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
|
||||
|
@ -5108,6 +5142,19 @@ getpass@^0.1.1:
|
|||
dependencies:
|
||||
assert-plus "^1.0.0"
|
||||
|
||||
gh-pages@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npmjs.org/gh-pages/-/gh-pages-3.1.0.tgz#ec3ed0f6a6e3fc3d888758fa018f08191c96bd55"
|
||||
integrity sha512-3b1rly9kuf3/dXsT8+ZxP0UhNLOo1CItj+3e31yUVcaph/yDsJ9RzD7JOw5o5zpBTJVQLlJAASNkUfepi9fe2w==
|
||||
dependencies:
|
||||
async "^2.6.1"
|
||||
commander "^2.18.0"
|
||||
email-addresses "^3.0.1"
|
||||
filenamify-url "^1.0.0"
|
||||
find-cache-dir "^3.3.1"
|
||||
fs-extra "^8.1.0"
|
||||
globby "^6.1.0"
|
||||
|
||||
glob-base@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
|
||||
|
@ -5223,6 +5270,17 @@ globby@^11.0.0:
|
|||
merge2 "^1.3.0"
|
||||
slash "^3.0.0"
|
||||
|
||||
globby@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
|
||||
integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=
|
||||
dependencies:
|
||||
array-union "^1.0.1"
|
||||
glob "^7.0.3"
|
||||
object-assign "^4.0.1"
|
||||
pify "^2.0.0"
|
||||
pinkie-promise "^2.0.0"
|
||||
|
||||
globule@^1.0.0:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz#d8bdd9e9e4eef8f96e245999a5dee7eb5d8529c4"
|
||||
|
@ -5613,6 +5671,14 @@ humanize-ms@^1.2.1:
|
|||
dependencies:
|
||||
ms "^2.0.0"
|
||||
|
||||
humanize-url@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz#f4ab99e0d288174ca4e1e50407c55fbae464efff"
|
||||
integrity sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=
|
||||
dependencies:
|
||||
normalize-url "^1.0.0"
|
||||
strip-url-auth "^1.0.0"
|
||||
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.24:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
|
@ -6109,6 +6175,11 @@ is-path-inside@^1.0.0:
|
|||
dependencies:
|
||||
path-is-inside "^1.0.1"
|
||||
|
||||
is-plain-obj@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
|
||||
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
|
||||
|
||||
is-plain-obj@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287"
|
||||
|
@ -6827,7 +6898,7 @@ lodash.uniq@4.5.0:
|
|||
resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
|
||||
|
||||
lodash@^4.0.0, lodash@~4.17.10:
|
||||
lodash@^4.0.0, lodash@^4.17.14, lodash@~4.17.10:
|
||||
version "4.17.20"
|
||||
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
||||
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
|
||||
|
@ -7535,6 +7606,16 @@ normalize-range@^0.1.2:
|
|||
resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
|
||||
integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=
|
||||
|
||||
normalize-url@^1.0.0:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
|
||||
integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=
|
||||
dependencies:
|
||||
object-assign "^4.0.1"
|
||||
prepend-http "^1.0.0"
|
||||
query-string "^4.1.0"
|
||||
sort-keys "^1.0.0"
|
||||
|
||||
normalize-url@^4.1.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
|
||||
|
@ -8354,7 +8435,7 @@ postcss@^7.0.0, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.
|
|||
source-map "^0.6.1"
|
||||
supports-color "^6.1.0"
|
||||
|
||||
prepend-http@^1.0.1:
|
||||
prepend-http@^1.0.0, prepend-http@^1.0.1:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
|
||||
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
|
||||
|
@ -8577,6 +8658,14 @@ qs@~6.5.2:
|
|||
resolved "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
|
||||
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
|
||||
|
||||
query-string@^4.1.0:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
|
||||
integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s=
|
||||
dependencies:
|
||||
object-assign "^4.1.0"
|
||||
strict-uri-encode "^1.0.0"
|
||||
|
||||
querystring-es3@^0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
|
||||
|
@ -9769,6 +9858,13 @@ socks@~2.3.2:
|
|||
ip "1.1.5"
|
||||
smart-buffer "^4.1.0"
|
||||
|
||||
sort-keys@^1.0.0:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
|
||||
integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0=
|
||||
dependencies:
|
||||
is-plain-obj "^1.0.0"
|
||||
|
||||
source-list-map@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
|
||||
|
@ -9970,6 +10066,11 @@ stream-shift@^1.0.0:
|
|||
resolved "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d"
|
||||
integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==
|
||||
|
||||
strict-uri-encode@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
|
||||
integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=
|
||||
|
||||
string-width@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
|
||||
|
@ -10130,6 +10231,18 @@ strip-json-comments@~2.0.1:
|
|||
resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
|
||||
|
||||
strip-outer@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631"
|
||||
integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.2"
|
||||
|
||||
strip-url-auth@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz#22b0fa3a41385b33be3f331551bbb837fa0cd7ae"
|
||||
integrity sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=
|
||||
|
||||
style-loader@^1.0.0:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.npmjs.org/style-loader/-/style-loader-1.2.1.tgz#c5cbbfbf1170d076cfdd86e0109c5bba114baa1a"
|
||||
|
@ -10432,6 +10545,13 @@ trim-newlines@^1.0.0:
|
|||
resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
|
||||
integrity sha1-WIeWa7WCpFA6QetST301ARgVphM=
|
||||
|
||||
trim-repeated@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21"
|
||||
integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE=
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.2"
|
||||
|
||||
trim-trailing-lines@^1.0.0:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz#7f0739881ff76657b7776e10874128004b625a94"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue