Skip to content

Commit d764c18

Browse files
authored
use Yarn workspaces, convert sync-api-docs and remark Snack plugin (facebook#2323)
1 parent e47b5a5 commit d764c18

22 files changed

Lines changed: 1863 additions & 2389 deletions

‎netlify.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[build]
2-
base = "website"
2+
base = ""
33
publish = "website/build"
4-
command = "export NODE_OPTIONS=--max_old_space_size=4096 && sed -i -e \"s|const baseUrl .*|const baseUrl = '/'|g\" docusaurus.config.js && yarn install && yarn build"
4+
command = "export NODE_OPTIONS=--max_old_space_size=4096 && yarn && cd website && sed -i -e \"s|const baseUrl .*|const baseUrl = '/'|g\" docusaurus.config.js && yarn build"

‎package.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"update-lock": "npx yarn-deduplicate"
5+
},
6+
"workspaces": ["website", "plugins/*", "sync-api-docs"]
7+
}
File renamed without changes.

website/plugins/remark-snackplayer/package.json renamed to plugins/remark-snackplayer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
"dependencies": {
2121
"dedent": "^0.7.0",
22+
"object.fromentries": "^2.0.2",
2223
"unist-builder": "^2.0.3",
2324
"unist-util-visit-parents": "^3.1.0"
2425
},

website/plugins/remark-snackplayer/src/index.js renamed to plugins/remark-snackplayer/src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
const visit = require('unist-util-visit-parents');
33
const u = require('unist-builder');
44
const dedent = require('dedent');
5+
const fromEntries = require('object.fromentries');
56

67
const parseParams = (paramString = '') => {
7-
const params = Object.fromEntries(new URLSearchParams(paramString));
8+
const params = fromEntries(new URLSearchParams(paramString));
89

910
if (!params.platform) {
1011
params.platform = 'web';
File renamed without changes.

website/plugins/remark-snackplayer/tests/markdown/test1.md renamed to plugins/remark-snackplayer/tests/markdown/test1.md

File renamed without changes.

website/plugins/remark-snackplayer/tests/markdown/test2.md renamed to plugins/remark-snackplayer/tests/markdown/test2.md

File renamed without changes.

website/plugins/remark-snackplayer/tests/output/output1.html renamed to plugins/remark-snackplayer/tests/output/output1.html

File renamed without changes.

website/plugins/remark-snackplayer/tests/output/output2.html renamed to plugins/remark-snackplayer/tests/output/output2.html

File renamed without changes.

0 commit comments

Comments
 (0)