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

Analyze if using NCP to copy folder is better #3

Open
gavinr opened this issue Sep 29, 2020 · 3 comments
Open

Analyze if using NCP to copy folder is better #3

gavinr opened this issue Sep 29, 2020 · 3 comments
Assignees
Labels

Comments

@gavinr
Copy link
Collaborator

gavinr commented Sep 29, 2020

Right now we're using copy in the rollup task, which I think runs each time a build happens:
1f1b08b#diff-ff6e5f22a9c7e66987b19c0199636480R47-R54

Another idea is to only copy the resources once, on npm-install, something like this:

image

Is this equivalent?
Is this better?

@gavinr gavinr self-assigned this Sep 29, 2020
@jwasilgeo
Copy link

jwasilgeo commented Oct 8, 2020

When doing a truly fresh clone + install, the "postinstall" in the screenshot won't quite cut it because the ./public/build folder doesn't exist yet and the copy will fail.

We need to prepend:

npm run build &&

Leading to this formula:

"npm run build && ncp ./node_modules/@esri/calcite-components/dist ./public/build/calcite-components"

@gavinr
Copy link
Collaborator Author

gavinr commented Jul 22, 2021

Since I logged this issue, I've simplified things a lot. This the diff with the svlete template: master...clean-svelte-template

Same issue still applies though - since we're using rollup-plugin-copy, when you save a change it takes about 10 seconds before the build is complete and the liveReload reloads the page :(

@gavinr
Copy link
Collaborator Author

gavinr commented Aug 19, 2021

I think using "rollup-plugin-copy" with copyOnce setting set to true is equivalent and simpler than the ncp solution. See here:
290d3ec#diff-6814bf77564b4f1c92f5861e184e28fe217c080a047fefa8b73a728f755ec45cR70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants