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

chore: Add commands to install all dependencies and run docs site from root #16

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/node_modules
/lib
/docs/node_modules
/docs/node_modules/
/docs/public/script.js
/docs/public/script.js.map
/coverage
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,16 @@ This codebase comes with a development environment to facilitate enhancements an
From the root directory, run:

```
npm install
npm run installAllDependencies
```

This will install all dependencies necessary for building the component and running the dev environment. Once this completes, run:
This completes the following steps:

- installs dependencies for React-Chatbot
- builds React-Chatbot
- installs the freshly-built React-Chatbot package in the docs site directory

Once this completes, run:

```
npm run docs
Expand Down
63 changes: 0 additions & 63 deletions docs/node_modules/.package-lock.json

This file was deleted.

1 change: 0 additions & 1 deletion docs/node_modules/@vectara/react-chatbot

This file was deleted.

1 change: 1 addition & 0 deletions docs/package-lock.json

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

1 change: 1 addition & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"build": "npm run clean && node build.js && tsc --emitDeclarationOnly --outDir lib",
"clean": "rimraf dist",
"lint": "eslint .",
"test": "jest --coverage"
"test": "jest --coverage",
"installAllDependencies": "npm install && npm run build && npm install --prefix docs",
"docs": "npm run docs --prefix docs"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just combine these two? I tried it locally and it's a nice DX. I don't think there's much time saved by splitting out the two commands.

"docs": "npm install && npm run build && npm install --prefix docs && npm run docs --prefix docs"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"author": {
"name": "Vectara, Inc.",
Expand Down
Loading