You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* **link:** add support for the download attribute ([789f94f](https://github.com/Sage/carbon/commit/789f94f7901f3848aa73f482ef86797525041ead))
18
+
19
+
### Bug Fixes
20
+
21
+
* **file-input:** add download attribute to completed state link ([6971449](https://github.com/Sage/carbon/commit/6971449b682830e9a02bcb04b89405965fb58c54)), closes [#7633](https://github.com/Sage/carbon/issues/7633)
Copy file name to clipboardExpand all lines: contributing/dev-environment-setup.md
+48-41Lines changed: 48 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,51 +2,31 @@
2
2
3
3
This guide will provide you with the information you need to be able to get started on your development journey.
4
4
5
-
## Contents
6
-
7
-
-[Text Editor](#text-editor)
8
-
-[Useful VSCode Extensions to Install](#useful-vscode-extensions-to-install)
9
-
-[Installing Node.js, NPM, and Git](#installing-nodejs-npm-and-git)
10
-
11
-
## Text Editor
12
-
13
-
[VSCode](https://code.visualstudio.com/) is our preferred text editor. We advise that you follow the installation instructions provided by Microsoft. Installation instructions can be found [here](https://code.visualstudio.com/docs/setup/mac) for Mac users and [here](https://code.visualstudio.com/docs/setup/windows) for Windows users.
14
-
15
-
## Useful VSCode Extensions to Install
16
-
17
-
You can browse and install extensions from within VS Code. Simply bring up the Extensions view by clicking on the [Extensions icon](https://code.visualstudio.com/assets/docs/editor/extension-gallery/extensions-view-icon.png) in the Activity Bar on the side of VS Code or the `View: Extensions command` (⇧+⌘+X) on Mac or (shift+alt+x) on Windows.
18
-
19
-
Below are some useful extensions that we recommend using with Carbon:
20
-
21
-
-[Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag) - automatically adds the closing tags for HTML and XML.
22
-
-[Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag) - automatically renames HTML and XML tags.
23
-
-[CodeSnap](https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap) - lets you take screenshots of your code and save them to a clipboard.
24
-
-[Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - basic spelling checker that works well with many file types. There is an [additional extension for getting the British English dictionary](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker-british-english).
25
-
-[ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - a code quality tool that checks your code for syntax errors and can automatically fix the syntax errors.
26
-
-[GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - provides a list of complementary features for use with git repositories, such as in-editor file annotations identifying who changed a line of code last.
27
-
-[markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - linter and style checker for markdown files.
28
-
-[MDX](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) - official extension for supporting MDX files.
29
-
-[Package Json Upgrade](https://marketplace.visualstudio.com/items?itemName=codeandstuff.package-json-upgrade) - adds in-editor file annotations to `package.json` stating if an installed package has a newly available version.
30
-
-[Playwright Test for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright) - for running Playwright tests directly within VSCode.
31
-
-[Total TypeScript](https://marketplace.visualstudio.com/items?itemName=mattpocock.ts-error-translator) - provides human-readable hints for TypeScript errors that are difficult to decipher.
32
-
-[vscode-styled-components](https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components) - this extension helps with the readability of the code for styled-components. The tool highlights syntax and reports any syntax errors in the code.
33
-
34
-
## Installing Node.js, NPM, and Git
5
+
-[Getting Your Dev Environment Started](#getting-your-dev-environment-started)
**NOTE: Carbon requires all contributors be on Node version 20 ("iron").**
39
-
40
-
The recommended way to install Node and npm is using [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm).
41
-
Once you have installed nvm, you should run:
19
+
Carbon is developed against a specific version of Node.js specified in the `.nvmrc` file. We recommend using [nvm](https://github.com/nvm-sh/nvm) for installing the correct version of Node.js and npm, this will allow you to install the correct version by running the following command:
42
20
43
21
```sh
44
-
nvm install lts/iron
45
-
```
22
+
# Check node version you're currently using:
23
+
node --version
46
24
47
-
which will install the correct version of Node and npm. You can verify the installed versions using `node --version` and `npm --v`.
25
+
# Switch to version required for Carbon:
26
+
nvm use
27
+
```
48
28
49
-
> If you are already a `nvm` user, you can also do `nvm use` which will automatically switch to the correct Node and npm versions.
29
+
If you are a Windows user, you'll need to [enable the Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install) to allow you to execute our scripts.
50
30
51
31
### Git
52
32
@@ -73,11 +53,11 @@ You need to add the following to `~/.gitconfig`:
73
53
74
54
This allows you to review PRs very easily. For example, if you are reviewing [https://github.com/Sage/carbon/pull/2408/](https://github.com/Sage/carbon/pull/2408/), you can use `git pr 2408` which will check out a new branch named pr/2408. This gives you the ability to review, change branches, merge and make experimental changes. The second command `git pr-clean` removes all branches that start with pr/. This is a useful for housekeeping of branches.
75
55
76
-
#### GPG Verification
56
+
###Signing commits
77
57
78
-
We strongly encourage our contributors to verify their commits with a GPG key. To set this up, please follow these instructions from GitHub [to enable GPG commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification).
58
+
Carbon requires all git commits to be signed with a GPG key for verification. To set this up, please follow these instructions [to create a GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#gpg-commit-signature-verification) and associate it with Git and your GitHub account.
79
59
80
-
Then add this to your profile (i.e`~/.zshrc` or `~/.bashrc`) so `gpg-agent` can prompt for your passphrase:
60
+
Then add this to your shell profile (i.e`~/.zshrc` or `~/.bashrc`), so `gpg-agent` can prompt for your passphrase:
81
61
82
62
`export GPG_TTY=$(tty)`
83
63
@@ -88,3 +68,30 @@ Then execute this command to sign all of your commits by default:
88
68
Restart of gpg-agent may be required. Use the command below to kill it (it will start next time its needed):
89
69
90
70
`$ gpgconf --kill gpg-agent`
71
+
72
+
## First time setup
73
+
74
+
Run the following command once to set-up your local environment:
75
+
76
+
```sh
77
+
npm run setup
78
+
```
79
+
80
+
Now you're ready to contribute!
81
+
82
+
## Optional supplementary tools
83
+
84
+
If you use VSCode, we suggest using the following extensions as useful aids:
85
+
86
+
-[Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag) - automatically adds the closing tags for HTML and XML.
87
+
-[Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag) - automatically renames HTML and XML tags.
88
+
-[CodeSnap](https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap) - lets you take screenshots of your code and save them to a clipboard.
89
+
-[Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - basic spelling checker that works well with many file types. There is an [additional extension for getting the British English dictionary](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker-british-english).
90
+
-[ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - a code quality tool that checks your code for syntax errors and can automatically fix the syntax errors.
91
+
-[GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - provides a list of complementary features for use with git repositories, such as in-editor file annotations identifying who changed a line of code last.
92
+
-[markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - linter and style checker for markdown files.
93
+
-[MDX](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) - official extension for supporting MDX files.
94
+
-[Package Json Upgrade](https://marketplace.visualstudio.com/items?itemName=codeandstuff.package-json-upgrade) - adds in-editor file annotations to `package.json` stating if an installed package has a newly available version.
95
+
-[Playwright Test for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright) - for running Playwright tests directly within VSCode.
96
+
-[Total TypeScript](https://marketplace.visualstudio.com/items?itemName=mattpocock.ts-error-translator) - provides human-readable hints for TypeScript errors that are difficult to decipher.
97
+
-[vscode-styled-components](https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components) - this extension helps with the readability of the code for styled-components. The tool highlights syntax and reports any syntax errors in the code.
"test:ct:coverage": "npm run generate-tokens:dev && npm run clear-playwright-cache && npm run clear-playwright-coverage-json && rimraf ./playwright/coverage && playwright test -c playwright-ct.config.ts",
"build": "npm run clean-lib && rollup -c \"./rollup.config.mjs\" && npm run build:generate-package-json-files && npm run build:move-svg && npm run build:types",
35
+
"build": "npm run clean-lib && npm run generate-tokens && npm run type-check && rollup -c \"./rollup.config.mjs\" && npm run build:generate-package-json-files && npm run build:move-svg && npm run build:types",
0 commit comments