Permalink
Browse files

Move Docusaurus 1 files into directory (#966)

* Move Docusaurus 1 into v1 directory

* Update Circle CI commands for new v1 dir

* Remove OC

* Fix tests
  • Loading branch information...
yangshun committed Sep 17, 2018
1 parent 9d4a5d5 commit f2927a9fc458cc368ebae5474e55b755fe4120db
Showing with 8,163 additions and 7,104 deletions.
  1. +7 −4 .circleci/config.yml
  2. +0 −10 .gitignore
  3. +7 −96 package.json
  4. 0 { → v1}/.babelrc
  5. 0 { → v1}/.eslintignore
  6. 0 { → v1}/.eslintrc.js
  7. +10 −0 v1/.gitignore
  8. +1 −4 { → v1}/.npmignore
  9. 0 { → v1}/docusaurus-init/README.md
  10. 0 { → v1}/docusaurus-init/initialize.js
  11. 0 { → v1}/docusaurus-init/package-lock.json
  12. 0 { → v1}/docusaurus-init/package.json
  13. 0 { → v1}/examples/basics/Dockerfile
  14. 0 { → v1}/examples/basics/README.md
  15. 0 { → v1}/examples/basics/blog-examples-from-docusaurus/2016-03-11-blog-post.md
  16. 0 { → v1}/examples/basics/blog-examples-from-docusaurus/2017-04-10-blog-post-two.md
  17. 0 { → v1}/examples/basics/blog-examples-from-docusaurus/2017-09-25-testing-rss.md
  18. 0 { → v1}/examples/basics/blog-examples-from-docusaurus/2017-09-26-adding-rss.md
  19. 0 { → v1}/examples/basics/blog-examples-from-docusaurus/2017-10-24-new-version-1.0.0.md
  20. 0 { → v1}/examples/basics/core/Footer.js
  21. 0 { → v1}/examples/basics/docker-compose.yml
  22. 0 { → v1}/examples/basics/dockerignore
  23. 0 { → v1}/examples/basics/docs-examples-from-docusaurus/doc1.md
  24. 0 { → v1}/examples/basics/docs-examples-from-docusaurus/doc2.md
  25. 0 { → v1}/examples/basics/docs-examples-from-docusaurus/doc3.md
  26. 0 { → v1}/examples/basics/docs-examples-from-docusaurus/exampledoc4.md
  27. 0 { → v1}/examples/basics/docs-examples-from-docusaurus/exampledoc5.md
  28. 0 { → v1}/examples/basics/gitignore
  29. 0 { → v1}/examples/basics/pages/en/help.js
  30. 0 { → v1}/examples/basics/pages/en/index.js
  31. 0 { → v1}/examples/basics/pages/en/users.js
  32. 0 { → v1}/examples/basics/sidebars.json
  33. 0 { → v1}/examples/basics/siteConfig.js
  34. 0 { → v1}/examples/basics/static/css/custom.css
  35. 0 { → v1}/examples/basics/static/img/docusaurus.svg
  36. BIN { → v1}/examples/basics/static/img/favicon.png
  37. BIN { → v1}/examples/basics/static/img/favicon/favicon.ico
  38. BIN { → v1}/examples/basics/static/img/oss_logo.png
  39. 0 { → v1}/examples/translations/crowdin.yaml
  40. 0 { → v1}/examples/translations/languages.js
  41. 0 { → v1}/examples/translations/pages/en/help-with-translations.js
  42. 0 { → v1}/examples/versions/pages/en/versions.js
  43. 0 { → v1}/lib/__tests__/build-files.test.js
  44. 0 { → v1}/lib/build-files.js
  45. 0 { → v1}/lib/copy-examples.js
  46. 0 { → v1}/lib/core/BlogPageLayout.js
  47. 0 { → v1}/lib/core/BlogPost.js
  48. 0 { → v1}/lib/core/BlogPostLayout.js
  49. 0 { → v1}/lib/core/BlogSidebar.js
  50. 0 { → v1}/lib/core/CompLibrary.js
  51. 0 { → v1}/lib/core/Container.js
  52. 0 { → v1}/lib/core/Doc.js
  53. 0 { → v1}/lib/core/DocsLayout.js
  54. 0 { → v1}/lib/core/DocsSidebar.js
  55. 0 { → v1}/lib/core/GridBlock.js
  56. 0 { → v1}/lib/core/Head.js
  57. 0 { → v1}/lib/core/MarkdownBlock.js
  58. 0 { → v1}/lib/core/Redirect.js
  59. 0 { → v1}/lib/core/Remarkable.js
  60. 0 { → v1}/lib/core/Site.js
  61. 0 { → v1}/lib/core/__tests__/__fixtures__/blog-post-with-truncate.md
  62. 0 { → v1}/lib/core/__tests__/__fixtures__/blog-post-without-truncate.md
  63. 0 { → v1}/lib/core/__tests__/__fixtures__/getTOC.md
  64. 0 { → v1}/lib/core/__tests__/__fixtures__/insertTOC.md
  65. 0 { → v1}/lib/core/__tests__/__fixtures__/test.md
  66. 0 { → v1}/lib/core/__tests__/__snapshots__/anchors.test.js.snap
  67. 0 { → v1}/lib/core/__tests__/__snapshots__/toc.test.js.snap
  68. 0 { → v1}/lib/core/__tests__/__snapshots__/utils.test.js.snap
  69. 0 { → v1}/lib/core/__tests__/anchors.test.js
  70. 0 { → v1}/lib/core/__tests__/toSlug.test.js
  71. 0 { → v1}/lib/core/__tests__/toc.test.js
  72. 0 { → v1}/lib/core/__tests__/utils.test.js
  73. 0 { → v1}/lib/core/anchors.js
  74. 0 { → v1}/lib/core/nav/HeaderNav.js
  75. 0 { → v1}/lib/core/nav/OnPageNav.js
  76. 0 { → v1}/lib/core/nav/SideNav.js
  77. 0 { → v1}/lib/core/renderMarkdown.js
  78. 0 { → v1}/lib/core/toSlug.js
  79. 0 { → v1}/lib/core/toc.js
  80. 0 { → v1}/lib/core/unindent.js
  81. 0 { → v1}/lib/core/utils.js
  82. 0 { → v1}/lib/publish-gh-pages.js
  83. 0 { → v1}/lib/rename-version.js
  84. 0 { → v1}/lib/server/__mocks__/tiny-lr.js
  85. 0 { → v1}/lib/server/__tests__/__fixtures__/2018-08-17-docusaurus.md
  86. 0 { → v1}/lib/server/__tests__/__fixtures__/doc1.md
  87. 0 { → v1}/lib/server/__tests__/__fixtures__/doc2.md
  88. 0 { → v1}/lib/server/__tests__/__fixtures__/metadata.js
  89. 0 { → v1}/lib/server/__tests__/__fixtures__/test.css
  90. 0 { → v1}/lib/server/__tests__/__fixtures__/test.md
  91. 0 { → v1}/lib/server/__tests__/__snapshots__/blog.test.js.snap
  92. 0 { → v1}/lib/server/__tests__/__snapshots__/docs.test.js.snap
  93. 0 { → v1}/lib/server/__tests__/__snapshots__/utils.test.js.snap
  94. 0 { → v1}/lib/server/__tests__/blog.test.js
  95. +10 −7 { → v1}/lib/server/__tests__/docs.test.js
  96. 0 { → v1}/lib/server/__tests__/liveReloadServer.test.js
  97. 0 { → v1}/lib/server/__tests__/routing.test.js
  98. 0 { → v1}/lib/server/__tests__/start.test.js
  99. 0 { → v1}/lib/server/__tests__/utils.test.js
  100. 0 { → v1}/lib/server/blog.js
  101. 0 { → v1}/lib/server/docs.js
  102. 0 { → v1}/lib/server/env.js
  103. 0 { → v1}/lib/server/feed.js
  104. 0 { → v1}/lib/server/generate.js
  105. 0 { → v1}/lib/server/liveReloadServer.js
  106. 0 { → v1}/lib/server/metadataUtils.js
  107. 0 { → v1}/lib/server/readCategories.js
  108. 0 { → v1}/lib/server/readMetadata.js
  109. 0 { → v1}/lib/server/renderUtils.js
  110. 0 { → v1}/lib/server/routing.js
  111. 0 { → v1}/lib/server/server.js
  112. 0 { → v1}/lib/server/sitemap.js
  113. 0 { → v1}/lib/server/start.js
  114. 0 { → v1}/lib/server/translate-plugin.js
  115. 0 { → v1}/lib/server/translate.js
  116. 0 { → v1}/lib/server/translation.js
  117. 0 { → v1}/lib/server/utils.js
  118. 0 { → v1}/lib/server/versionFallback.js
  119. 0 { → v1}/lib/start-server.js
  120. 0 { → v1}/lib/static/css/main.css
  121. 0 { → v1}/lib/static/css/prism.css
  122. 0 { → v1}/lib/static/img/language.svg
  123. 0 { → v1}/lib/version.js
  124. 0 { → v1}/lib/write-translations.js
  125. 0 { → v1}/package-lock.json
  126. +93 −0 v1/package.json
  127. 0 { → v1}/website/blog/2017-12-14-introducing-docusaurus.md
  128. 0 { → v1}/website/blog/2018-04-30-How-I-Converted-Profilo-To-Docusaurus.md
  129. 0 { → v1}/website/blog/2018-09-11-Towards-Docusaurus-2.md
  130. 0 { → v1}/website/core/Footer.js
  131. 0 { → v1}/website/data/custom-translation-strings.json
  132. 0 { → v1}/website/data/users.js
  133. 0 { → v1}/website/languages.js
  134. +1 −1 { → v1}/website/package.json
  135. 0 { → v1}/website/pages/en/about-slash.js
  136. 0 { → v1}/website/pages/en/help.js
  137. 0 { → v1}/website/pages/en/index.js
  138. 0 { → v1}/website/pages/en/users.js
  139. 0 { → v1}/website/pages/en/versions.js
  140. 0 { → v1}/website/sidebars.json
  141. +1 −0 { → v1}/website/siteConfig.js
  142. 0 { → v1}/website/static/.circleci/config.yml
  143. 0 { → v1}/website/static/css/code-blocks-buttons.css
  144. 0 { → v1}/website/static/css/custom.css
  145. 0 { → v1}/website/static/googlebbd50c8f1c6e7332.html
  146. BIN { → v1}/website/static/img/christopher-chedeau.jpg
  147. BIN { → v1}/website/static/img/docusaurus.ico
  148. BIN { → v1}/website/static/img/docusaurus.png
  149. 0 { → v1}/website/static/img/docusaurus.svg
  150. 0 { → v1}/website/static/img/docusaurus_keytar.svg
  151. BIN { → v1}/website/static/img/docusaurus_live.gif
  152. BIN { → v1}/website/static/img/docusaurus_live.webp
  153. 0 { → v1}/website/static/img/docusaurus_monochrome.svg
  154. 0 { → v1}/website/static/img/docusaurus_speed.svg
  155. BIN { → v1}/website/static/img/favicon/favicon.ico
  156. 0 { → v1}/website/static/img/frank.svg
  157. BIN { → v1}/website/static/img/getting-started-preparation-verify.png
  158. BIN { → v1}/website/static/img/hector-ramos.png
  159. BIN { → v1}/website/static/img/markdown.png
  160. BIN { → v1}/website/static/img/oss_logo.png
  161. BIN { → v1}/website/static/img/profilo_blog_post_android_ios.png
  162. BIN { → v1}/website/static/img/profilo_blog_post_palette_website_color_picker.png
  163. BIN { → v1}/website/static/img/profilo_blog_post_photoshop_color_picker.png
  164. BIN { → v1}/website/static/img/profilo_blog_post_website_final.png
  165. BIN { → v1}/website/static/img/profilo_blog_post_website_final_docs.png
  166. BIN { → v1}/website/static/img/profilo_blog_post_website_initial.png
  167. 0 { → v1}/website/static/img/react.svg
  168. BIN { → v1}/website/static/img/ricky-vetter.jpg
  169. 0 { → v1}/website/static/img/search.svg
  170. BIN { → v1}/website/static/img/slash-birth.png
  171. 0 { → v1}/website/static/img/slash-introducing.svg
  172. BIN { → v1}/website/static/img/slash-upandrunning.png
  173. 0 { → v1}/website/static/img/translation.svg
  174. BIN { → v1}/website/static/img/users/BlueWhale.png
  175. BIN { → v1}/website/static/img/users/almin.png
  176. 0 { → v1}/website/static/img/users/anssr.svg
  177. BIN { → v1}/website/static/img/users/atalaya.png
  178. 0 { → v1}/website/static/img/users/babel.svg
  179. BIN { → v1}/website/static/img/users/bemuse.png
  180. 0 { → v1}/website/static/img/users/bowler.svg
  181. 0 { → v1}/website/static/img/users/bucklescript.svg
  182. BIN { → v1}/website/static/img/users/captainduckduck.png
  183. 0 { → v1}/website/static/img/users/docusaurus.svg
  184. BIN { → v1}/website/static/img/users/draftjs.png
  185. 0 { → v1}/website/static/img/users/facebook-instant-articles-rules-editor.svg
  186. BIN { → v1}/website/static/img/users/fasttext.png
  187. BIN { → v1}/website/static/img/users/flipper.png
  188. 0 { → v1}/website/static/img/users/fuse-box.svg
  189. 0 { → v1}/website/static/img/users/golang-dep.svg
  190. BIN { → v1}/website/static/img/users/jest.png
  191. BIN { → v1}/website/static/img/users/makeitopen.png
  192. 0 { → v1}/website/static/img/users/metro.svg
  193. BIN { → v1}/website/static/img/users/ml5.png
  194. BIN { → v1}/website/static/img/users/plus.png
  195. BIN { → v1}/website/static/img/users/prettier.png
  196. 0 { → v1}/website/static/img/users/pyre.svg
  197. BIN { → v1}/website/static/img/users/react-native-elements.png
  198. 0 { → v1}/website/static/img/users/react-native-ios-kit.svg
  199. 0 { → v1}/website/static/img/users/react-native.svg
  200. 0 { → v1}/website/static/img/users/reaction-commerce.svg
  201. 0 { → v1}/website/static/img/users/reason-react.svg
  202. 0 { → v1}/website/static/img/users/reason.svg
  203. 0 { → v1}/website/static/img/users/rejoiner.svg
  204. 0 { → v1}/website/static/img/users/relay.svg
  205. BIN { → v1}/website/static/img/users/verdaccio-tiny@2x.png
  206. 0 { → v1}/website/static/img/users/warriorjs.svg
  207. 0 { → v1}/website/static/img/versioning.svg
  208. 0 { → v1}/website/static/js/code-blocks-buttons.js
  209. 0 { → v1}/website/versioned_docs/version-1.0.11/api-commands.md
  210. 0 { → v1}/website/versioned_docs/version-1.0.11/api-doc-markdown.md
  211. 0 { → v1}/website/versioned_docs/version-1.0.11/api-pages.md
  212. 0 { → v1}/website/versioned_docs/version-1.0.11/api-site-config.md
  213. 0 { → v1}/website/versioned_docs/version-1.0.11/getting-started-installation.md
  214. 0 { → v1}/website/versioned_docs/version-1.0.11/getting-started-preparation.md
  215. 0 { → v1}/website/versioned_docs/version-1.0.11/getting-started-publishing.md
  216. 0 { → v1}/website/versioned_docs/version-1.0.11/getting-started-site-creation.md
  217. 0 { → v1}/website/versioned_docs/version-1.0.11/guides-blog.md
  218. 0 { → v1}/website/versioned_docs/version-1.0.11/guides-custom-pages.md
  219. 0 { → v1}/website/versioned_docs/version-1.0.11/guides-navigation.md
  220. 0 { → v1}/website/versioned_docs/version-1.0.11/guides-search.md
  221. 0 { → v1}/website/versioned_docs/version-1.0.11/guides-translation.md
  222. 0 { → v1}/website/versioned_docs/version-1.0.11/guides-versioning.md
  223. 0 { → v1}/website/versioned_docs/version-1.0.12/api-pages.md
  224. 0 { → v1}/website/versioned_docs/version-1.0.12/api-site-config.md
  225. 0 { → v1}/website/versioned_docs/version-1.0.12/getting-started-publishing.md
  226. 0 { → v1}/website/versioned_docs/version-1.0.12/guides-blog.md
  227. 0 { → v1}/website/versioned_docs/version-1.0.12/guides-versioning.md
  228. 0 { → v1}/website/versioned_docs/version-1.0.13/api-site-config.md
  229. 0 { → v1}/website/versioned_docs/version-1.0.14/getting-started-installation.md
  230. 0 { → v1}/website/versioned_docs/version-1.0.14/getting-started-publishing.md
  231. 0 { → v1}/website/versioned_docs/version-1.0.14/getting-started-site-creation.md
  232. 0 { → v1}/website/versioned_docs/version-1.0.14/guides-blog.md
  233. 0 { → v1}/website/versioned_docs/version-1.0.15/api-commands.md
  234. 0 { → v1}/website/versioned_docs/version-1.0.15/api-doc-markdown.md
  235. 0 { → v1}/website/versioned_docs/version-1.0.15/api-pages.md
  236. 0 { → v1}/website/versioned_docs/version-1.0.15/api-site-config.md
  237. 0 { → v1}/website/versioned_docs/version-1.0.15/getting-started-installation.md
  238. 0 { → v1}/website/versioned_docs/version-1.0.15/getting-started-preparation.md
  239. 0 { → v1}/website/versioned_docs/version-1.0.15/getting-started-publishing.md
  240. 0 { → v1}/website/versioned_docs/version-1.0.15/getting-started-site-creation.md
  241. 0 { → v1}/website/versioned_docs/version-1.0.15/guides-blog.md
  242. 0 { → v1}/website/versioned_docs/version-1.0.15/guides-custom-pages.md
  243. 0 { → v1}/website/versioned_docs/version-1.0.15/guides-navigation.md
  244. 0 { → v1}/website/versioned_docs/version-1.0.15/guides-search.md
  245. 0 { → v1}/website/versioned_docs/version-1.0.15/guides-translation.md
  246. 0 { → v1}/website/versioned_docs/version-1.0.15/guides-versioning.md
  247. 0 { → v1}/website/versioned_docs/version-1.1.0/api-commands.md
  248. 0 { → v1}/website/versioned_docs/version-1.1.0/api-site-config.md
  249. 0 { → v1}/website/versioned_docs/version-1.1.0/getting-started-publishing.md
  250. 0 { → v1}/website/versioned_docs/version-1.1.3/getting-started-installation.md
  251. 0 { → v1}/website/versioned_docs/version-1.1.4/getting-started-installation.md
  252. 0 { → v1}/website/versioned_docs/version-1.1.4/getting-started-preparation.md
  253. 0 { → v1}/website/versioned_docs/version-1.2.0/api-commands.md
  254. 0 { → v1}/website/versioned_docs/version-1.2.0/api-doc-markdown.md
  255. 0 { → v1}/website/versioned_docs/version-1.2.0/api-pages.md
  256. 0 { → v1}/website/versioned_docs/version-1.2.0/api-site-config.md
  257. 0 { → v1}/website/versioned_docs/version-1.2.0/getting-started-installation.md
  258. 0 { → v1}/website/versioned_docs/version-1.2.0/getting-started-preparation.md
  259. 0 { → v1}/website/versioned_docs/version-1.2.0/getting-started-publishing.md
  260. 0 { → v1}/website/versioned_docs/version-1.2.0/getting-started-site-creation.md
  261. 0 { → v1}/website/versioned_docs/version-1.2.0/guides-blog.md
  262. 0 { → v1}/website/versioned_docs/version-1.2.0/guides-custom-pages.md
  263. 0 { → v1}/website/versioned_docs/version-1.2.0/guides-navigation.md
  264. 0 { → v1}/website/versioned_docs/version-1.2.0/guides-translation.md
  265. 0 { → v1}/website/versioned_docs/version-1.2.0/guides-versioning.md
  266. 0 { → v1}/website/versioned_docs/version-1.2.1/api-commands.md
  267. 0 { → v1}/website/versioned_docs/version-1.2.1/api-site-config.md
  268. 0 { → v1}/website/versioned_docs/version-1.2.1/getting-started-installation.md
  269. 0 { → v1}/website/versioned_docs/version-1.2.1/getting-started-publishing.md
  270. 0 { → v1}/website/versioned_docs/version-1.2.1/guides-blog.md
  271. 0 { → v1}/website/versioned_docs/version-1.2.1/guides-search.md
  272. 0 { → v1}/website/versioned_docs/version-1.2.1/guides-translation.md
  273. 0 { → v1}/website/versioned_docs/version-1.3.0/api-doc-markdown.md
  274. 0 { → v1}/website/versioned_docs/version-1.3.0/guides-blog.md
  275. 0 { → v1}/website/versioned_docs/version-1.3.3/api-doc-markdown.md
  276. 0 { → v1}/website/versioned_docs/version-1.3.3/api-site-config.md
  277. 0 { → v1}/website/versioned_docs/version-1.3.3/getting-started-installation.md
  278. 0 { → v1}/website/versioned_docs/version-1.3.3/getting-started-preparation.md
  279. 0 { → v1}/website/versioned_docs/version-1.3.3/guides-search.md
  280. 0 { → v1}/website/versioned_docs/version-1.3.3/guides-translation.md
  281. 0 { → v1}/website/versioned_docs/version-1.4.0/api-site-config.md
  282. 0 { → v1}/website/versioned_docs/version-1.4.0/getting-started-docker.md
  283. 0 { → v1}/website/versioned_docs/version-1.4.0/guides-navigation.md
  284. 0 { → v1}/website/versioned_docs/version-1.4.0/guides-translation.md
  285. 0 { → v1}/website/versioned_sidebars/version-1.0.11-sidebars.json
  286. 0 { → v1}/website/versioned_sidebars/version-1.3.0-sidebars.json
  287. 0 { → v1}/website/versioned_sidebars/version-1.4.0-sidebars.json
  288. 0 { → v1}/website/versions.json
  289. +7,426 −0 v1/yarn.lock
  290. +1 −0 v2/package.json
  291. +606 −6,982 yarn.lock
@@ -8,6 +8,7 @@ aliases:
- &save-yarn-cache
paths:
- node_modules
- v1/node_modules
- ~/.cache/yarn
key: v1-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
@@ -23,6 +24,8 @@ aliases:
- &yarn
|
yarn install --non-interactive --cache-folder ~/.cache/yarn
cd v1 &&
yarn install --non-interactive --cache-folder ~/.cache/yarn
defaults: &defaults
working_directory: ~/docusaurus
@@ -41,13 +44,13 @@ jobs:
- save-cache: *save-yarn-cache
- run:
name: Check Prettier & ESLint
command: yarn ci-check
command: cd v1 && yarn ci-check
- run:
name: Run Test Suites
command: yarn test
command: cd v1 && yarn test
- run:
name: Test Static Website Builds
command: cd website && yarn run build
command: cd v1/website && yarn run build
# The CIRCLE_ variables are defined during the CircleCI build process
# https://circleci.com/docs/1.0/environment-variables/
@@ -74,7 +77,7 @@ jobs:
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then
echo "Deploying website..."
# install Docusaurus and generate file of English strings
yarn && cd website && yarn run write-translations
cd v1 && yarn && cd website && yarn run write-translations
# install Crowdin
sudo apt-get update
sudo apt-get install default-jre rsync
@@ -6,15 +6,5 @@
node_modules
.eslintcache
lib/core/metadata.js
lib/core/MetadataBlog.js
lib/pages/
website/build/
website/i18n/*
website/node_modules
website/package-lock.json
website/translated_docs
website/yarn.lock
yarn-error.log
@@ -1,112 +1,23 @@
{
"name": "docusaurus",
"description": "Easy to Maintain Open Source Documentation Websites",
"version": "1.4.0",
"license": "MIT",
"keywords": ["documentation", "websites", "open source", "docusaurus"],
"repository": {
"type": "git",
"url": "https://github.com/facebook/Docusaurus.git"
},
"scripts": {
"ci-check": "yarn lint && yarn prettier:diff",
"lint": "eslint --cache \"lib/**/*.js\" \"examples/**/*.js\" \"website/**/*.js\"",
"precommit": "lint-staged",
"ci-check": "yarn prettier && cd v1 && yarn ci-check",
"prettier": "prettier --config .prettierrc --write \"**/*.js\"",
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.js\"",
"test": "jest",
"start": "cd website && yarn start",
"postinstall": "opencollective postinstall"
},
"lint-staged": {
"linters": {
"{lib,examples,website}/**/*.js": [
"yarn lint --fix",
"yarn prettier",
"git add"
]
}
},
"jest": {
"testPathIgnorePatterns": ["/node_modules/", "__fixtures__", "v2"],
"testURL": "http://localhost/"
},
"bin": {
"docusaurus-start": "./lib/start-server.js",
"docusaurus-build": "./lib/build-files.js",
"docusaurus-publish": "./lib/publish-gh-pages.js",
"docusaurus-examples": "./lib/copy-examples.js",
"docusaurus-write-translations": "./lib/write-translations.js",
"docusaurus-version": "./lib/version.js",
"docusaurus-rename-version": "./lib/rename-version.js"
},
"dependencies": {
"autoprefixer": "^9.1.5",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-register": "^6.24.1",
"babel-traverse": "^6.25.0",
"babylon": "^6.17.4",
"chalk": "^2.1.0",
"classnames": "^2.2.6",
"color": "^2.0.1",
"commander": "^2.18.0",
"cross-spawn": "^6.0.5",
"crowdin-cli": "^0.3.0",
"cssnano": "^3.10.0",
"deepmerge": "^2.1.1",
"escape-string-regexp": "^1.0.5",
"express": "^4.15.3",
"feed": "^1.1.0",
"fs-extra": "^5.0.0",
"gaze": "^1.1.2",
"glob": "^7.1.3",
"highlight.js": "^9.12.0",
"imagemin": "^5.3.1",
"imagemin-gifsicle": "^5.2.0",
"imagemin-jpegtran": "^5.0.2",
"imagemin-optipng": "^5.2.1",
"imagemin-svgo": "^6.0.0",
"markdown-toc": "^1.2.0",
"mkdirp": "^0.5.1",
"opencollective": "^1.0.3",
"portfinder": "^1.0.17",
"postcss": "^7.0.1",
"prismjs": "^1.15.0",
"react": "^16.5.0",
"react-dev-utils": "^5.0.2",
"react-dom": "^16.5.0",
"remarkable": "^1.7.1",
"request": "^2.87.0",
"shelljs": "^0.7.8",
"sitemap": "^1.13.0",
"tcp-port-used": "^0.1.2",
"tiny-lr": "^1.1.1",
"tree-node-cli": "^1.2.5",
"truncate-html": "^1.0.1"
"start": "cd v1/website && yarn start"
},
"devDependencies": {
"babel-eslint": "^8.2.5",
"eslint": "^4.19.1",
"eslint-config-airbnb": "17.0.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.9.1",
"filepath": "^1.1.0",
"front-matter": "^2.3.0",
"glob-promise": "^3.3.0",
"husky": "^0.14.3",
"jest": "^23.6.0",
"lint-staged": "^7.2.0",
"prettier": "^1.13.7",
"rimraf": "^2.6.2"
"prettier": "^1.13.7"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/Docusaurus"
"lint-staged": {
"linters": {
"{v1,v2}/**/*.js": ["yarn lint --fix", "yarn prettier", "git add"]
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,10 @@
lib/core/metadata.js
lib/core/MetadataBlog.js
lib/pages/
website/build/
website/i18n/*
website/node_modules
website/package-lock.json
website/translated_docs
website/yarn.lock
@@ -1,9 +1,6 @@
node_modules
.DS_Store
lib/core/metadata.js
lib/core/MetadataBlog.js
yarn-error.log
yarn.lock
website
docs
docusaurus-init
v2
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -81,15 +81,18 @@ describe('mdToHtmlify', () => {
describe('getFile', () => {
const fakeContent = {
'website/translated_docs/ko/doc1.md': '이건 가짜 야',
'website/versioned_docs/version-1.0.0/doc2.md': 'Document 2 is not good',
'website/translated_docs/ko/version-1.0.0/doc1.md':
'v1/website/translated_docs/ko/doc1.md': '이건 가짜 야',
'v1/website/versioned_docs/version-1.0.0/doc2.md': 'Document 2 is not good',
'v1/website/translated_docs/ko/version-1.0.0/doc1.md':
'이것은 오래된 가짜입니다.',
'docs/doc1.md': 'Just another document',
};
fs.existsSync = jest.fn().mockReturnValue(true);
fs.readFileSync = jest.fn().mockImplementation(file => {
const fakePath = file.replace(process.cwd().replace(/website$/, ''), '');
const fakePath = file.replace(
process.cwd().replace(/v1\/website\/?$/, ''),
'',
);
const normalizedPath = fakePath.replace(/\\/g, '/');
return fakeContent[normalizedPath];
});
@@ -108,21 +111,21 @@ describe('getFile', () => {
test('translated docs', () => {
const metadata = Metadata['ko-doc1'];
expect(docs.getFile(metadata)).toEqual(
fakeContent['website/translated_docs/ko/doc1.md'],
fakeContent['v1/website/translated_docs/ko/doc1.md'],
);
});
test('versioned docs', () => {
const metadata = Metadata['en-version-1.0.0-doc2'];
expect(docs.getFile(metadata)).toEqual(
fakeContent['website/versioned_docs/version-1.0.0/doc2.md'],
fakeContent['v1/website/versioned_docs/version-1.0.0/doc2.md'],
);
});
test('translated & versioned docs', () => {
const metadata = Metadata['ko-version-1.0.0-doc1'];
expect(docs.getFile(metadata)).toEqual(
fakeContent['website/translated_docs/ko/version-1.0.0/doc1.md'],
fakeContent['v1/website/translated_docs/ko/version-1.0.0/doc1.md'],
);
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,93 @@
{
"name": "docusaurus",
"description": "Easy to Maintain Open Source Documentation Websites",
"version": "1.4.0",
"license": "MIT",
"keywords": ["documentation", "websites", "open source", "docusaurus"],
"repository": {
"type": "git",
"url": "https://github.com/facebook/Docusaurus.git"
},
"scripts": {
"ci-check": "yarn lint",
"lint": "eslint --cache \"lib/**/*.js\" \"examples/**/*.js\" \"website/**/*.js\"",
"test": "jest",
"start": "cd website && yarn start"
},
"jest": {
"testPathIgnorePatterns": ["/node_modules/", "__fixtures__", "v2"],
"testURL": "http://localhost/"
},
"bin": {
"docusaurus-start": "./lib/start-server.js",
"docusaurus-build": "./lib/build-files.js",
"docusaurus-publish": "./lib/publish-gh-pages.js",
"docusaurus-examples": "./lib/copy-examples.js",
"docusaurus-write-translations": "./lib/write-translations.js",
"docusaurus-version": "./lib/version.js",
"docusaurus-rename-version": "./lib/rename-version.js"
},
"dependencies": {
"autoprefixer": "^9.1.5",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-register": "^6.24.1",
"babel-traverse": "^6.25.0",
"babylon": "^6.17.4",
"chalk": "^2.1.0",
"classnames": "^2.2.6",
"color": "^2.0.1",
"commander": "^2.18.0",
"cross-spawn": "^6.0.5",
"crowdin-cli": "^0.3.0",
"cssnano": "^3.10.0",
"deepmerge": "^2.1.1",
"escape-string-regexp": "^1.0.5",
"express": "^4.15.3",
"feed": "^1.1.0",
"fs-extra": "^5.0.0",
"gaze": "^1.1.2",
"glob": "^7.1.3",
"highlight.js": "^9.12.0",
"imagemin": "^5.3.1",
"imagemin-gifsicle": "^5.2.0",
"imagemin-jpegtran": "^5.0.2",
"imagemin-optipng": "^5.2.1",
"imagemin-svgo": "^6.0.0",
"markdown-toc": "^1.2.0",
"mkdirp": "^0.5.1",
"portfinder": "^1.0.17",
"postcss": "^7.0.1",
"prismjs": "^1.15.0",
"react": "^16.5.0",
"react-dev-utils": "^5.0.2",
"react-dom": "^16.5.0",
"remarkable": "^1.7.1",
"request": "^2.87.0",
"shelljs": "^0.7.8",
"sitemap": "^1.13.0",
"tcp-port-used": "^0.1.2",
"tiny-lr": "^1.1.1",
"tree-node-cli": "^1.2.5",
"truncate-html": "^1.0.1"
},
"devDependencies": {
"babel-eslint": "^8.2.5",
"eslint": "^4.19.1",
"eslint-config-airbnb": "17.0.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.9.1",
"filepath": "^1.1.0",
"front-matter": "^2.3.0",
"glob-promise": "^3.3.0",
"husky": "^0.14.3",
"jest": "^23.6.0",
"lint-staged": "^7.2.0",
"rimraf": "^2.6.2"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -13,6 +13,6 @@
},
"dependencies": {
"async": "^2.5.0",
"docusaurus": "../../Docusaurus/"
"docusaurus": "../"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -70,6 +70,7 @@ const siteConfig = {
zIndex: 100,
},
enableUpdateTime: true,
customDocsPath: '../docs',
};
module.exports = siteConfig;