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

Enable build of docs site on Windows #300

Merged
merged 2 commits into from
Jan 27, 2023
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
10 changes: 6 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
The PCUI documentation website is built using a Jekyll template. The markdown pages for the site can be found and edited in the `docs/pages` directory.

The doc site also makes use of storybook to display React components and typedocs to display the API reference. If you are developing the PCUI library, you should use `npm run storybook` and `npm run typedocs` directly to generate the storybook and typedocs respectively. The following guide is for updating and publishing the documentation site.
### Testing docs locally (macOS)

Ensure you have Ruby 3.x installed.
### Testing docs locally

Ensure you have Ruby 3.x installed. Go [here](https://rubyinstaller.org/downloads/) for a Windows installer.

In the `pcui/docs` directory run:

`bundle install`

To install the ruby dependencies. If you are having trouble with the install, try deleting the `Gemfile.lock` file.

Then in the main pcui directory run:
Then in the main PCUI directory run:

`npm run build:typedocs` to build the latest typedocs API reference site which will be copied into the doc site in the next step

Expand All @@ -27,7 +29,7 @@ Visit http://localhost:3497/

If you haven't cloned the [playcanvas.github.io](https://github.com/playcanvas/playcanvas.github.io) repo, install it locally to a projects folder which will now be referenced as `<projects_folder>`.

Then in the pcui main directory run:
Then in the PCUI main directory run:

`npm run build:docsite:production`

Expand Down
121 changes: 121 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"build:react:es6": "rollup -c --environment target:react:es6",
"build": "rollup -c && npm run bundle:styles",
"build:icons": "cd ./utils && node ./build-font-icons.mjs",
"build:docsite:local": "cd docs && bundle exec jekyll build --config _config_local.yml && mkdir _site/storybook && cd .. && ENVIRONMENT=production build-storybook --no-dll -o ./docs/_site/storybook && cp -r ./typedocs ./docs/_site/typedocs",
"build:docsite:production": "cd docs && bundle exec jekyll build --config _config.yml && mkdir _site/storybook && cd .. && ENVIRONMENT=production build-storybook --no-dll -o ./docs/_site/storybook && cp -r ./typedocs ./docs/_site/typedocs",
"build:docsite:local": "cd docs && bundle exec jekyll build --config _config_local.yml && shx mkdir _site/storybook && cd .. && cross-env ENVIRONMENT=production build-storybook --no-dll -o ./docs/_site/storybook && shx cp -r ./typedocs ./docs/_site/typedocs",
"build:docsite:production": "cd docs && bundle exec jekyll build --config _config.yml && shx mkdir _site/storybook && cd .. && cross-env ENVIRONMENT=production build-storybook --no-dll -o ./docs/_site/storybook && shx cp -r ./typedocs ./docs/_site/typedocs",
"docsite:serve": "serve docs/_site -p 3497",
"build:types": "tsc --project ./tsconfig.json --declaration --emitDeclarationOnly --outDir types && tsc --project ./react/tsconfig.json --declaration --emitDeclarationOnly --outDir ./react/types",
"build:typedocs": "typedoc --tsconfig ./tsconfig.json",
Expand Down Expand Up @@ -122,6 +122,7 @@
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"autoprefixer": "^10.4.13",
"cross-env": "^7.0.3",
"eslint": "^8.32.0",
"eslint-import-resolver-typescript": "^3.5.3",
"playcanvas": "^1.60.0",
Expand All @@ -137,6 +138,7 @@
"rollup-plugin-sass": "^1.12.17",
"scss-bundle": "^3.1.2",
"serve": "^14.1.2",
"shx": "^0.3.4",
"stylelint": "^14.16.1",
"stylelint-config-standard-scss": "^6.1.0",
"typedoc": "^0.23.24",
Expand Down