|
65 | 65 | # Replace links to other packages with links to the deno branch:
|
66 | 66 | find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/";
|
67 | 67 |
|
68 |
| - # Replace reference to `@stdlib/types` with deno.land link: |
69 |
| - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ <reference types=\"@stdlib\/types\"\/>/\/\/\/ <reference types=\"https:\/\/deno.land\/x\/stdlib_types\/index.d.ts\"\/>/g" |
| 68 | + # Replace reference to `@stdlib/types` with CDN link: |
| 69 | + find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ <reference types=\"@stdlib\/types\"\/>/\/\/\/ <reference types=\"https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/types@main\/index.d.ts\"\/>/g" |
70 | 70 |
|
71 | 71 | # Change wording of project description to avoid reference to JavaScript and Node.js:
|
72 | 72 | find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g"
|
|
83 | 83 | find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+<\!\-\- \/.cli \-\->//g"
|
84 | 84 | find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"c\">[\s\S]+<\!\-\- \/.c \-\->//g"
|
85 | 85 |
|
| 86 | + # Create package.json file for deno branch: |
| 87 | + jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json |
| 88 | +
|
86 | 89 | - name: Publish to deno branch
|
87 | 90 | uses: peaceiris/actions-gh-pages@v3
|
88 | 91 | with:
|
@@ -152,6 +155,9 @@ jobs:
|
152 | 155 | # Wrap contents of `<script type="text/javascript">` tag contents in an IIFE:
|
153 | 156 | find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<script type=\"text\/javascript\">([\s\S]+?)<\/script>/<script type=\"text\/javascript\">\n\(function \(\) {\1}\)\(\)\n<\/script>/g"
|
154 | 157 |
|
| 158 | + # Create package.json file for umd branch: |
| 159 | + jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "main": "./bundle.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./umd/package.json |
| 160 | +
|
155 | 161 | - name: Publish to umd branch
|
156 | 162 | uses: peaceiris/actions-gh-pages@v3
|
157 | 163 | with:
|
@@ -227,6 +233,9 @@ jobs:
|
227 | 233 | # Rewrite examples section to be a HTML file:
|
228 | 234 | find ./esm -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\#\# Examples([\s\S]*)\`\`\`javascript([\s\S]+?)\`\`\`/\#\# Examples\1\`\`\`html\n<\!DOCTYPE html>\n<html lang=\"en\">\n<body>\n<script type=\"module\">\n\2\n<\/script>\n<\/body>\n<\/html>\n\`\`\`/g"
|
229 | 235 |
|
| 236 | + # Create package.json file for esm branch: |
| 237 | + jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./index.mjs", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./esm/package.json |
| 238 | +
|
230 | 239 | - name: Publish to esm branch
|
231 | 240 | uses: peaceiris/actions-gh-pages@v3
|
232 | 241 | with:
|
|
0 commit comments