Skip to content

Commit

Permalink
chore: update npm script 😋
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
  • Loading branch information
zFernand0 committed Dec 11, 2024
1 parent 7de93d0 commit c0e1ca2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
18 changes: 10 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ This document is intended to help you build the documentation that will eventual
These steps should help you to build the documentation

0. Clone the repository, open a terminal, and `cd` into the repository directory
1. Create a virtual environment and install all dependencies:
- `python -m venv venv`
- `python -m pip install -r docs/requirements.txt`
2. On the terminal, navigate to the docs folder and run `make html`
- `cd docs`
- `make html`
3. On the file explorer, navigate to the `<repo>/docs/build/html/` directory
4. Open the `index.html` in a browser.
1. Install project dependencies:
- `npm install`
2. Create a virtual environment:
- `npm run env:create`
3. Activate the virtual environment:
- `npm run env:activate`
4. Install the doc dependencies
- `npm run doc:install`
5. Build and open the documentation:
- `npm run doc:dev`
15 changes: 13 additions & 2 deletions package-lock.json

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

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"test": "tests"
},
"scripts": {
"postinstall": "npm run src:install && npm run doc:install",
"src:install": "python -m pip install -r requirements.txt",
"src:pydocstyle": "pydocstyle --match-dir='^(?!(build|response)$).*' --match='^(?!(__init__\\.py|setup\\.py$)).*\\.py$' src",
"src:pydoclint": "pydoclint --exclude='.*/(build|response)/.*' src",
Expand All @@ -19,10 +18,15 @@
"src:test:pytest": "coverage run -m pytest ./tests/unit",
"src:test:xml": "coverage xml",
"doc:install": "python -m pip install -r docs/requirements.txt",
"doc:dev": "npm run doc:clean && npm run doc:build && npm run doc:open",
"doc:build": "cd docs && make html",
"doc:clean": "cd docs && make clean",
"doc:open": "opener docs/build/html/index.html",
"env:create": "python -m venv env",
"env:delete": "deactivate && rimraf env"
"env:active": "run-script-os",
"env:active:win32": "echo 'To activate, run the following command:\n\nenv\\Scripts\\activate\n\nTo deactivate, simply run:\n\ndeactivate\n'",
"env:active:default": "echo 'To activate, run the following command:\n\nsource env/bin/activate\n\nTo deactivate, simply run:\n\ndeactivate\n'",
"env:delete": "rimraf env"
},
"repository": {
"type": "git",
Expand All @@ -41,6 +45,7 @@
"homepage": "https://github.com/zowe/zowe-client-python-sdk#readme",
"devDependencies": {
"opener": "^1.5.2",
"rimraf": "^6.0.1"
"rimraf": "^6.0.1",
"run-script-os": "^1.1.6"
}
}

0 comments on commit c0e1ca2

Please sign in to comment.