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: standardize npm script names #461

Merged
merged 2 commits into from
Aug 14, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
- name: Run build
run: npm run build
- name: Validate Internal Links
run: npm run validate:links
run: npm run lint:links
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@
},
"license": "Apache-2.0",
"scripts": {
"images": "imagemin '_site/assets/images' --out-dir='_site/assets/images'",
"install:playground": "cd src/playground && npm install --no-package-lock",
"watch:sass": "sass --watch src/assets/scss:src/assets/css",
"watch:eleventy": "cross-env IS_DEV=true eleventy --serve --port=2022",
"watch:webpack": "webpack watch --mode=development",
"build": "npm-run-all install:playground build:sass build:website build:playground build:minify-images",
"build:minify-images": "imagemin '_site/assets/images' --out-dir='_site/assets/images'",
harish-sethuraman marked this conversation as resolved.
Show resolved Hide resolved
"build:minify-svg": "svgo -r -f ./",
"build:playground": "webpack --mode=production --progress",
"build:playground:watch": "webpack watch --mode=development",
"build:sass": "sass --no-source-map --style=compressed src/assets/scss:src/assets/css",
"build:eleventy": "npx @11ty/eleventy",
"build:webpack": "webpack --mode=production --progress",
"fetch:team": "node tools/fetch-team-data.js",
"build:sass:watch": "sass --watch src/assets/scss:src/assets/css",
"build:website": "npx @11ty/eleventy",
"build:website:watch": "cross-env IS_DEV=true eleventy --serve --port=2022",
"fetch": "npm-run-all --parallel fetch:*",
Copy link
Member

Choose a reason for hiding this comment

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

according to https://github.com/eslint/eslint/blob/main/docs/src/contribute/package-json-conventions.md we do not have any convention for fetch. May be we should consider adding it to the doc or replace these fetch with something like build:fetch?

Copy link
Member

Choose a reason for hiding this comment

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

build:fetch looks good to me.

Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Member

Choose a reason for hiding this comment

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

@mdjermanovic what do you think? I could live with adding a fetch: prefix.

Otherwise, maybe build:remote-data?

Copy link
Member

@kecrily kecrily Aug 7, 2023

Choose a reason for hiding this comment

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

If it can just add the fetch prefix, then that's better in my opinion.

Copy link
Member

Choose a reason for hiding this comment

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

Adding new fetch: prefix sounds good to me.

build: = generates a set of files from local files only.
fetch: = Like build:, but includes fetching some data from remote locations.

Copy link
Member

Choose a reason for hiding this comment

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

Aligned on introducing fetch: scripts. Lets add it to the contribute's package-json-convention also @snitin315

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update the docs.

"fetch:stats": "node tools/fetch-stats.js",
"fetch:sponsors": "node tools/fetch-sponsors.js",
"fetch": "npm-run-all --parallel fetch:*",
"start": "npm-run-all build:sass --parallel watch:*",
"build": "npm-run-all install:playground build:sass build:eleventy build:webpack images",
"minify:svg": "svgo -r -f ./",
"validate:links": "cross-env NODE_OPTIONS=--max-old-space-size=4096 node tools/validate-links.js",
"fetch:team": "node tools/fetch-team-data.js",
"install:playground": "cd src/playground && npm install --no-package-lock",
"lint": "npm-run-all --parallel lint:js lint:md lint:scss",
"lint:fix": "npm-run-all --parallel lint:fix:*",
"lint:js": "eslint --ext=.js,.jsx .",
"lint:fix:js": "eslint --ext=.js,.jsx . --fix",
"lint:links": "cross-env NODE_OPTIONS=--max-old-space-size=4096 node tools/validate-links.js",
"lint:md": "markdownlint \"**/*.md\" ",
"lint:fix:md": "markdownlint --fix \"**/*.md\"",
"lint:scss": "stylelint \"**/*.scss\"",
"lint": "npm-run-all --parallel lint:*",
"lint:fix:js": "eslint --ext=.js,.jsx . --fix",
"lint:fix:scss": "stylelint \"**/*.scss\" --fix",
"lint:fix:md": "markdownlint --fix \"**/*.md\"",
"fix": "npm-run-all --parallel lint:fix:*"
"start": "npm-run-all build:sass --parallel *:*:watch"
},
"lint-staged": {
"**/*.{js,jsx}": "eslint --fix",
Expand Down
Loading