Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docusaurus-examples places examples in wrong subdirectory #38

Closed
hramos opened this issue Aug 7, 2017 · 1 comment
Closed

docusaurus-examples places examples in wrong subdirectory #38

hramos opened this issue Aug 7, 2017 · 1 comment

Comments

@hramos
Copy link
Contributor

hramos commented Aug 7, 2017

The example files are being copied to YOUR_SITE/website/YOUR_SITE/website/node_modules/docusaurus/examples instead of YOUR_SITE/website.

Consider a new plain example site, docusample, with a single package.json file:

$ pwd
/Users/hramos/git/examples/docusample/website
$ ls -ltras
total 8
8 -rw-r--r--    1 hramos  THEFACEBOOK\Domain Users   314 Aug  7 14:31 package.json
0 drwxr-xr-x    4 hramos  THEFACEBOOK\Domain Users   136 Aug  7 14:51 ..
0 drwxr-xr-x    4 hramos  THEFACEBOOK\Domain Users   136 Aug  7 14:52 .

It's contents are:

{
  "scripts": {
    "start": "docusaurus-start",
    "build": "docusaurus-build",
    "publish-gh-pages": "docusaurus-publish",
    "examples": "docusaurus-examples"
  },
  "devDependencies": {
    "docusaurus": "git@github.com:facebookexperimental/Docusaurus.git"
  }
}

Running npm run examples will place all the placeholder files inside YOUR_SITE/website/YOUR_SITE/website/node_modules/docusaurus/examples/ instead of YOUR_SITE/website/ itself:

$ pwd
/Users/hramos/git/examples/docusample/website
$ ls -ltras
total 8
8 -rw-r--r--    1 hramos  THEFACEBOOK\Domain Users   314 Aug  7 14:31 package.json
0 drwxr-xr-x    4 hramos  THEFACEBOOK\Domain Users   136 Aug  7 14:51 ..
0 drwxr-xr-x  258 hramos  THEFACEBOOK\Domain Users  8772 Aug  7 14:55 node_modules
0 drwxr-xr-x    3 hramos  THEFACEBOOK\Domain Users   102 Aug  7 14:55 docusample
0 drwxr-xr-x    5 hramos  THEFACEBOOK\Domain Users   170 Aug  7 14:55 .
$ ls -ltras docusample/website/node_modules/docusaurus/examples/
total 16
0 drwxr-xr-x  3 hramos  THEFACEBOOK\Domain Users   102 Aug  7 14:55 static
8 -rw-r--r--  1 hramos  THEFACEBOOK\Domain Users  2481 Aug  7 14:55 siteConfig.js
8 -rw-r--r--  1 hramos  THEFACEBOOK\Domain Users   174 Aug  7 14:55 sidebar.json
0 drwxr-xr-x  3 hramos  THEFACEBOOK\Domain Users   102 Aug  7 14:55 pages
0 drwxr-xr-x  3 hramos  THEFACEBOOK\Domain Users   102 Aug  7 14:55 core
0 drwxr-xr-x  3 hramos  THEFACEBOOK\Domain Users   102 Aug  7 14:55 ..
0 drwxr-xr-x  7 hramos  THEFACEBOOK\Domain Users   238 Aug  7 14:55 .
@deltice
Copy link
Contributor

deltice commented Aug 9, 2017

Currently updating all example files and the examples script; currently not seeing this behavior but will examine more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants