Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[build]
base = "website"
base = ""
publish = "website/build"
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"
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"
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"private": true,
"scripts": {
"update-lock": "npx yarn-deduplicate"
},
"workspaces": ["website", "plugins/*", "sync-api-docs"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"dependencies": {
"dedent": "^0.7.0",
"object.fromentries": "^2.0.2",
"unist-builder": "^2.0.3",
"unist-util-visit-parents": "^3.1.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
const visit = require('unist-util-visit-parents');
const u = require('unist-builder');
const dedent = require('dedent');
const fromEntries = require('object.fromentries');

const parseParams = (paramString = '') => {
const params = Object.fromEntries(new URLSearchParams(paramString));
const params = fromEntries(new URLSearchParams(paramString));

if (!params.platform) {
params.platform = 'web';
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions sync-api-docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@react-native-website/sync-api",
"version": "0.0.1",
"private": true,
"scripts": {
"sync": "node sync-api-docs ../../react-native"
},
"devDependencies": {
"@motiz88/react-native-docgen": "0.0.3",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"he": "^1.2.0",
"path": "^0.12.7",
"react-docgen-markdown-renderer": "^2.1.3",
"tokenize-comment": "^3.0.1"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
'https://github.com/facebook/react-native-website/blob/master/website/',
path: '../docs',
sidebarPath: require.resolve('./sidebars.json'),
remarkPlugins: [require('./plugins/remark-snackplayer')],
remarkPlugins: [require('../plugins/remark-snackplayer')],
},
blog: {
path: 'blog',
Expand Down
9 changes: 2 additions & 7 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
"prettier:diff": "yarn nit:source",
"test": "yarn build",
"lint": "cd ../ && alex .",
"lintv": "cd ../ && alex",
"sync:docs": "node scripts/sync-api-docs/sync-api-docs ../../react-native",
"update-lock": "npx yarn-deduplicate"
"lintv": "cd ../ && alex"
},
"husky": {
"hooks": {
Expand All @@ -44,16 +42,13 @@
"remark-snackplayer": "./plugins/remark-snackplayer"
},
"devDependencies": {
"@motiz88/react-native-docgen": "0.0.3",
"alex": "^9.0.1",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"glob-promise": "^3.4.0",
"husky": "^4.2.5",
"path": "^0.12.7",
"prettier": "1.16.4",
"pretty-quick": "^1.11.1",
"react-docgen-markdown-renderer": "^2.1.3",
"tokenize-comment": "^3.0.1"
"pretty-quick": "^1.11.1"
}
}
Loading