Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow Sass Static PageViews to recompile themselves #86

Merged
merged 11 commits into from
Nov 12, 2018

Conversation

allejo
Copy link
Member

@allejo allejo commented Nov 7, 2018

Summary

Q A
Bug fix? yes
New feature? yes
BC breaks? yes
Deprecations? no
Fixed issues Fixes #79

Description

Instead of calling the Scss compiler when the PageManagerPostProcess event is fired, call it when the CompilerPostRenderStaticPageView event is called; this event is called every time the Static PageView has been requested to be compiled.

Changes

A large change in this PR is that CompileProcessPostRenderPageView and CompileProcessPreRenderPageView has been split up into specialized events for each PageView type with more useful information with regards to which PageView is actually being compiled. This change breaks BC but since 0.2.0 is still in alpha, it's safe to break.

Check List

  • Added appropriate PhpDoc for modifications
  • Added unit test to ensure fix works as intended

@allejo allejo added WIP Core: Non-breaking This is a small change to the project's internal; can be planned for minor releases Bug: Fix A tag for PRs to signify it's fixing a bug labels Nov 7, 2018
@allejo allejo added this to the v0.2.0 milestone Nov 7, 2018
@allejo allejo changed the title Allow Sass Static PageViews to recompile themselves WIP Allow Sass Static PageViews to recompile themselves Nov 7, 2018
@allejo allejo changed the title WIP Allow Sass Static PageViews to recompile themselves Allow Sass Static PageViews to recompile themselves Nov 7, 2018
The following two events:

  - CompileProcessPostRenderPageView
  - CompileProcessPreRenderPageView

have been split up into more targeted events containing more useful
information such as the current PageView and relevant information to the
PageView such current ExpandedValue or CollectableItem:

  - CompileProcessPostRenderDynamicPageView
  - CompileProcessPostRenderRepeaterPageView
  - CompileProcessPostRenderStaticPageView
  - CompileProcessPreRenderDynamicPageView
  - CompileProcessPreRenderRepeaterPageView
  - CompileProcessPreRenderStaticPageView

This is not a backwards compatible change.
@allejo allejo force-pushed the hotfix/diff-sass-event branch from 9f1da0d to 4001093 Compare November 10, 2018 04:08
Extend the original Sass compiler with a custom version that supports
being reused so the dev server can serve updated Sass on reload without
having to reparse all of the Sass and take advantage of the existing
internal cache.
@allejo allejo added Core: Breaking This will require a large change to the project's internals; save this for major releases Core: Dev Server Relating to the internal development server used for the 'serve' command and removed Core: Non-breaking This is a small change to the project's internal; can be planned for minor releases labels Nov 10, 2018
@allejo allejo force-pushed the hotfix/diff-sass-event branch from d793f5a to af4608f Compare November 12, 2018 01:57
@allejo allejo removed the WIP label Nov 12, 2018
@allejo allejo merged commit 2fc7ef4 into master Nov 12, 2018
@allejo allejo deleted the hotfix/diff-sass-event branch November 12, 2018 02:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug: Fix A tag for PRs to signify it's fixing a bug Core: Breaking This will require a large change to the project's internals; save this for major releases Core: Dev Server Relating to the internal development server used for the 'serve' command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sass does not rebuild while running serve
1 participant