Skip to content

Commit 525c982

Browse files
committed
npm link method
1 parent 3c612ca commit 525c982

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

contribution-guidelines-engineering.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,20 @@ This post provides some contribution guidelines for CSS/Scss in Atlas.
2828

2929
## When updating existing Scss
3030

31-
- try using [`npm link`](https://docs.npmjs.com/cli/v7/commands/npm-link) to view the impact on existing systems that import Atlas.
31+
Try using [`npm link`](https://docs.npmjs.com/cli/v7/commands/npm-link) to view the impact on existing systems that import Atlas.
32+
33+
1. Checkout Atlas branch. Ex: xyz/feature-name
34+
1. `cd ./css; npm link` This creates a symlink between your local repo and atlas-css npm package on your machine installed globally.
35+
1. Checkout a branch in a downstream repo. Ex. xyz/feature-name-atlas
36+
1. `cd ./package/using-atlas-css/; npm link @microsoft/atlas-css`. This will create a reference to the global package we just symlinked. Note that `/package/using-atlas-css/` is a fictional name for illustration only.
37+
1. However! one more step is necessary I found ... go in and delete /package/using-atlas-css/node_modules/@microsoft/atlas-css folder.
38+
1. If the above isn't working, you'll see a CSS build error related to the new usage of the layout css module.
39+
1. After that, you should be good to run your start/build commands and visit an a page to test local atlas.
40+
1. Depending on how your downstream repo is set up, you may need to retrigger builds/watchers or bust cache by making changes to css files if you're developing in tandem.
41+
42+
Maybe also do this:
43+
44+
1. Also tried removing package-lock and reinstalling,
3245

3346
## Enable the Changeset bot with a fine-grain PAT
3447

0 commit comments

Comments
 (0)