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

Allow file change events to pass through to let the Copy task succeed #3001

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

splitinfinities
Copy link
Contributor

@splitinfinities splitinfinities commented Aug 16, 2021

Allows the dev server to pick up changes during the www copy tasks, so consumers don't have to restart their dev server when developing.

I've tested this experience on each starter repo, a monorepo, and framework.

Before this change:

Set up a www output target that with a copy rule, e.g.

{
      type: 'www', 
      copy: [
        { src: 'images' }
      ]
}

Within that images directory, try to make file modifications - change the content, duplicate the file, delete the file. The contents should not be carried over during the process of the dev server's lifecycle. Commonly, you have to restart the dev server in order to make the copy task run.

After this change:

All file change events now get passed down to the tasks. Copy now works as expected - files get copied when needed.

Internal ticket: STENCIL-29

@splitinfinities splitinfinities requested a review from a team August 16, 2021 23:29
@splitinfinities
Copy link
Contributor Author

I believe, looking at the history of that file, that this is a regression that happened after we tried to improve our Monorepo support.

@splitinfinities
Copy link
Contributor Author

Also shoutout to @ltm for this fix - I just tested it.

@splitinfinities splitinfinities changed the title Allow file change events to pass through Allow file change events to pass through to let the Copy task success Aug 16, 2021
@splitinfinities splitinfinities changed the title Allow file change events to pass through to let the Copy task success Allow file change events to pass through to let the Copy task succeed Aug 16, 2021
@rwaskiewicz
Copy link
Contributor

Before we merge this, @splitinfinities can you do me a favor and update the PR summary with the testing steps you took for historical purposes?

@splitinfinities
Copy link
Contributor Author

@rwaskiewicz Done!

@splitinfinities splitinfinities self-assigned this Aug 17, 2021
@rwaskiewicz rwaskiewicz merged commit b84dd11 into master Aug 17, 2021
@rwaskiewicz rwaskiewicz deleted the STENCIL-29-fix-copy-task-source branch August 17, 2021 14:44
rwaskiewicz pushed a commit that referenced this pull request Aug 17, 2021
update dev-server to allow changes in directories listed in copy tasks 
of a stencil config file to be updated instantly, rather than having to
restart the server.

STENCIL-29: Feature Request: Ability to watch a copy task source and refresh www build when modified
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

Successfully merging this pull request may close these issues.

3 participants