Skip to content

Commit

Permalink
Extend scripts to a more general packages management topic
Browse files Browse the repository at this point in the history
  • Loading branch information
LeBenLeBen committed Nov 6, 2023
1 parent d0ac276 commit 18df215
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 6 additions & 3 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ export default defineConfig({

sidebar: [
{
text: 'Guide',
text: 'Common',
items: [{ text: 'Whitespace', link: '/whitespace/' }],
},
{
text: 'Front-end',
items: [
{ text: 'Whitespace', link: '/whitespace/' },
{ text: 'Browers support', link: '/browsers-support/' },
{ text: 'Accessibility', link: '/accessibility/' },
{ text: 'Assets bundling', link: '/assets-bundling/' },
{ text: 'Scripts', link: '/scripts/' },
{ text: 'Packages management', link: '/packages-management/' },
{ text: 'Styleguides', link: '/styleguides/' },
{ text: 'Tools', link: '/tools/' },
],
Expand Down
2 changes: 1 addition & 1 deletion docs/javascript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Add some scripts in your package.json to validate/format files:
// ...
```

See [scripts](/scripts/) for conventions.
See [scripts](/packages-management/#scripts) for conventions.

### Related

Expand Down
8 changes: 6 additions & 2 deletions docs/scripts/index.md → docs/packages-management/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Running scripts
# Packages management

We use [npm](https://www.npmjs.com/package/npm) scripts to run all kind of tasks related to npm packages.
We use [npm](https://www.npmjs.com/package/npm) to install dependencies and tools.

## Scripts

We use npm scripts to run various commands easily. We're trying to standardize script names across projects, with no regard for the different tools used in the background.

1. Favor npm default scripts such as `start` or `test` over custom ones.
2. Name common scripts based on what they do, not what tools they run: `test:unit` instead of `jest`
Expand Down

0 comments on commit 18df215

Please sign in to comment.