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

norska init should be aware of a mono-repo setup #67

Open
pixelastic opened this issue Aug 25, 2020 · 0 comments
Open

norska init should be aware of a mono-repo setup #67

pixelastic opened this issue Aug 25, 2020 · 0 comments

Comments

@pixelastic
Copy link
Owner

When running norska init in ./docs/ when in a monorepo setup, some files could be created in a better place. The initial code was meant with the assumption that the git root was the same as the module root (ie. package.json file is sitting next to .git folder).

In a mono-repo setup:

  • There is a repoRoot, where the .git folder is, as well as the main package.json
  • There is a projectRoot, that can be a subfolder of the repoRoot, and might have its own package.json

The following points should be addressed:

netlify.toml

The netlify.toml file should be created in the repoRoot, not the projectRoot. Netlify operates on the repository level, listening to events on the repo. This will be our job to make sure a job is started only when the documentation is updated.

[build]
  command = "yarn run build:prod"
  publish = "./docs/dist/"

The command might stay build:prod and point to a script in the root that builds the ./docs folder. The publish directory must point to the subfolder.

⚠ Maybe the commands involving the netlify cli will need a netlify.toml in the docs/ folder. We need to check.

.gitignore

The .netlify/ folder is added to the current .gitignore, but because there is no such file in the project root, a new one is created. It should add .netlify to the .gitignore in the repoRoot instead.

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

1 participant