1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/website/package.json
Thomas Heartman 0a99dfd6e3
#1391: add generated doc cleaning script (#2077)
* #1391: add generated doc cleaning script

## What

The cleaning script replaces all references to the Unleash ushosted instance in the
generated OpenAPI docs. It removes extra path segments (such as leading
`/ushosted` instances) and replaces the ushosted base url with something
user-agnostic.

## Why

When we host the OpenAPI docs in our official documentation, the generated
docs shouldn't necessarily point at _one specific instance_, and especially
not one that the reader is unlikely to ever use. Instead, we can remove all
the bits that are specific to the generation source we use, and make the docs
easier to use. In particular, removing the leading `/ushosted` is likely to
save us loooots of questions.

* #1391: change env var used for generating openapi from localhost

Using NODE_ENV=development doesn't necessarily make sense, so adding
an extra variable sounds reasonable to me.

* #1391: ensure that all generation commands also clean docs

* #1391: change <your-unleash-instance-url> to <your-unleash-url>

* #1391: fix ushosted replacement: not all paths start with /api

* #1391: chore: remove potential `ushosted` ending of api url

In the event that we change the base URL of OpenAPI, so that paths
don't start with `/ushosted/`, the script should still work, changing
those paths into <your-unleash-url> too.

Additionally, remove all instances of `/ushosted` that we find. In the
event that some things switch around or whatever.
2022-09-20 12:43:39 +02:00

82 lines
2.3 KiB
JSON

{
"name": "websitev-2",
"version": "0.0.0",
"private": true,
"engines": {
"node": ">=16.14"
},
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "yarn generate && docusaurus build",
"swizzle": "docusaurus swizzle",
"generate": "docusaurus gen-api-docs all && node clean-generated-docs.js",
"deploy": "yarn generate && docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"dependencies": {
"@docusaurus/core": "2.0.1",
"@docusaurus/plugin-client-redirects": "2.0.1",
"@docusaurus/plugin-google-analytics": "2.0.1",
"@docusaurus/preset-classic": "2.0.1",
"@docusaurus/remark-plugin-npm2yarn": "2.0.1",
"@mdx-js/react": "1.6.22",
"@svgr/webpack": "6.3.1",
"clsx": "1.2.1",
"docusaurus-plugin-openapi-docs": "1.1.9",
"docusaurus-theme-openapi-docs": "1.1.9",
"file-loader": "6.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"unleash-proxy-client": "2.1.0",
"url-loader": "4.1.1"
},
"resolutions": {
"async": "^3.2.4",
"trim": "^1.0.0",
"got": "^11.8.5",
"glob-parent": "^6.0.0",
"browserslist": "^4.16.5",
"set-value": "^4.0.1",
"immer": "^9.0.6",
"ansi-regex": "^5.0.1",
"nth-check": "^2.0.1",
"shelljs": "^0.8.5",
"trim-newlines": "^4.0.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/core": "7.18.13",
"@docusaurus/module-type-aliases": "2.0.1",
"@storybook/addon-actions": "6.5.10",
"@storybook/addon-essentials": "6.5.10",
"@storybook/addon-interactions": "6.5.10",
"@storybook/addon-links": "6.5.10",
"@storybook/react": "6.5.10",
"@storybook/testing-library": "0.0.13",
"@tsconfig/docusaurus": "1.0.6",
"babel-loader": "8.2.5",
"enhanced-resolve": "5.10.0",
"react-router": "6.3.0",
"replace-in-file": "^6.3.5",
"storybook-addon-root-attribute": "1.0.2",
"typescript": "4.8.2"
}
}