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

🧰 Frontend Infrastructure and Tooling 🛠️ #3

Merged
merged 22 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
16 changes: 8 additions & 8 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cool frontend tech for the website:
- :art: [SCSS modules](https://github.com/css-modules/css-modules)
- :nail_care: [Tailwind CSS](https://tailwindcss.com/) for utility styles
- :racing_car: [Tailwind JIT](https://tailwindcss.com/docs/just-in-time-mode) for on-demand Tailwind styles
- :package: [pnpm](https://github.com/pnpm/pnpm) for package management
- :package: [Yarn](https://classic.yarnpkg.com/en/) for package management
Copy link
Collaborator Author

@codemonkey800 codemonkey800 Apr 9, 2021

Choose a reason for hiding this comment

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

While I love that pnpm is growing significantly and is up to 2x faster than competitors, it still doesn't have Dependabot support.

Dependabot has support for parsing and updating the yarn.lock file, which is crucial for detecting and fixing security vulnerabilities. When Dependabot gets support for the pnpm-lock.yaml files, we can revisit swapping Yarn for pnpm.

- :camera_flash: [Jest](https://jestjs.io/) + [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) for unit and snapshot tests
- :performing_arts: [Jest](https://jestjs.io/) + [Playwright](https://github.com/microsoft/playwright) for E2E tests
- :mag: [ESlint](https://eslint.org/) + [Stylelint](https://stylelint.io/) for TypeScript and SCSS linting
Expand All @@ -19,7 +19,7 @@ cool frontend tech for the website:
### Node.js

We use Node.js and various packages on NPM for building napari hub. For
package management, we use [pnpm](https://github.com/pnpm/pnpm).
package management, we use [yarn](https://classic.yarnpkg.com/en/).

It's recommended you use NVM so you don't have to manage multiple Node.js versions yourself:

Expand All @@ -36,19 +36,19 @@ nvm install
# Uses project defined Node.js version
nvm use

# Install pnpm globally
npm -g install pnpm
# Install yarn globally
npm -g install yarn

# Install project dependencies
pnpm install
yarn install
```

## Development Mode

To run the app in development mode, run the following command:

```sh
pnpm dev
yarn dev
```

This will start the Next.js dev server with [fast refresh](https://nextjs.org/docs/basic-features/fast-refresh). Edit some code and watch it update in the browser without having to refresh :heart_eyes:
Expand All @@ -60,13 +60,13 @@ boilerplate in the codebase. You can run Plop without any arguments and get a
list of generators you can use:

```sh
pnpm plop
yarn plop
```

If you want to use a specific generator, you can pass the name as the first
argument:

```sh
# Run component generator
pnpm plop component
yarn plop component
```
9 changes: 4 additions & 5 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
"dev:next": "next dev -p 8080",
"dev:tsm": "tsm -w -e default 'src/**/*.module.scss'",
"e2e": "jest -c jest/e2e.config.js",
"e2e:watch": "pnpm e2e -- --watch",
"e2e:update": "pnpm e2e -- --updateSnapshot",
"plop": "plop",
"e2e:watch": "yarn e2e -- --watch",
"e2e:update": "yarn e2e -- --updateSnapshot",
"postinstall": "cd .. && husky install",
"start": "next start -p 8080",
"test": "jest -c jest/test.config.js",
"test:watch": "pnpm jest -- --watch",
"test:update": "pnpm jest -- --updateSnapshot"
"test:watch": "yarn jest -- --watch",
"test:update": "yarn jest -- --updateSnapshot"
},
"dependencies": {
"axios": "^0.21.1",
Expand Down
Loading