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

npm run start does not pick up css changes #10193

Closed
tordans opened this issue Apr 8, 2024 · 4 comments
Closed

npm run start does not pick up css changes #10193

tordans opened this issue Apr 8, 2024 · 4 comments

Comments

@tordans
Copy link
Collaborator

tordans commented Apr 8, 2024

URL

How to reproduce the issue?

For #10046 I did a new checkout of this branch

The css from https://github.com/openstreetmap/iD/pull/10046/files#diff-56fc787113948ee3ddbf3d4979def5dbe8a49fc58cd98ebfd25c8ef364d4fa93R36 was not picked up.

Second test

  1. stop server
  2. run npm run build
  3. run npm run start
  4. now the css is picket up

So something does not happen which happens in build which should also happen in start, right?

Screenshot(s) or anything else?

Which deployed environments do you see the issue in?

No response

What version numbers does this issue effect?

#10046

Which browsers are you seeing this problem on?

Chrome

@k-yle
Copy link
Collaborator

k-yle commented Apr 8, 2024

I always run npm run all after editing non-JS files, but for this case npm run build:css is probably sufficient?

@MeteSayan
Copy link

If I understand correctly, the npm run start command includes start:watch, which in turn only encompasses build:js:watch. Therefore, it's normal that the CSS distribution isn't updated with the npm run start command alone. As @k-yle mentioned, running the npm run build:css command is necessary to update the CSS distribution.

I'm relatively new to contributing to this repository, so if I've misunderstood the issue, I'll gladly correct my response.

@laigyu
Copy link
Contributor

laigyu commented Apr 15, 2024

I think only js has --watch, so if editing non-js files, need to build the corresponding file type first.
npm run all : clean + build + dist , I think is cover most part

npm run build: build:css + build:data(ex. core.yaml) + build:js , 3 type

not sure what clean and dist doing,
My understanding is that clean is remove some type of file in dist/, and dist is build some type of file(ex. svg) to dist/

npm run start : build:js:watch + start:server , only build js

npm run test: lint + build + test:spec , 3 type + lint + test

time(although comparing time is meaningless)
npm run test >>>>> npm run all > npm run build

I usually use npm run build + npm run start to test ui, I think is ok


package.json
npm run all
svg-sprite
shx

@tordans
Copy link
Collaborator Author

tordans commented May 3, 2024

Thanks for the help. I will close this and hope to remember to run all first next time…

@tordans tordans closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants