Skip to content

Tweak npm scripts #1186

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: npm ci

- name: Build docs
run: mkdocs build --strict
run: npm run build
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Personally, I'd like to keep this the same as Netlify. So, let's wait after #1194 is done.


- name: Test
run: npm test
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
},
"homepage": "https://docs.pi-hole.net/",
"scripts": {
"build": "mkdocs build --clean",
"build": "mkdocs build --clean --strict",
"markdownlint": "markdownlint-cli2 \"**/*.md\" \"!**/node_modules/**\"",
"linkinator": "npm run build && linkinator site --recurse --silent --skip \"^(?!http://localhost)\"",
"linkinator": "linkinator site --recurse --silent --skip \"^(?!http://localhost)\"",
"test": "npm run markdownlint && npm run linkinator",
"serve": "mkdocs serve --dev-addr 0.0.0.0:8000"
"serve": "mkdocs serve --dev-addr 0.0.0.0:8000",
"start": "npm run serve"
Copy link
Member

Choose a reason for hiding this comment

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

I also added a npm start script to start the server as a shortcut.

I'm a bit undecided about this. There is not much difference in npm run start vs npm run serve. Or is npm run start something 'common' one should have (best practice?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The difference is that one can do npm start and it works, while serve needs npm run serve. So, it's better to follow the standard here and make everyone's lives easier :)

},
"devDependencies": {
"linkinator": "^6.1.2",
Expand Down