-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add file navigation, sass compilation and exporting #6
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduces the SassWorkspaceCompiler to allow SASS compilation and workspace management. This utility facilitates the compilation of SASS files using a virtual file system, it allows the inclusion of static resources. The VirtualSassImporter, implementing the Importer interface, efficiently resolves import directives within this virtual file system. ***Example*** ```javascript // Define your workspace const workspace = [ { name: 'main.scss', content: '@import "variables"; .body { color: $primaryColor; }', type: 'scss' }, { name: 'variables.scss', content: '$primaryColor: blue;', type: 'scss' } ]; // Instantiate the compiler with the workspace const compiler = new SassWorkspaceCompiler(testWorkspace, {}, 'main.scss'); // Compile the SCSS const compiledCss = compiler.compile(); ``` Additionally, a prebuild script has been introduced to automate the generation of the virtual workspace structure directly from the `@srgssr/pillarbox-web` dependency's SCSS files.
Coverage Report
File Coverage
|
6e17551
to
cecf313
Compare
cecf313
to
6e87939
Compare
|
Introduces a new `TogglePaneButton` component, aimed at displaying a virtual file system in order to edit the multiple `scss` files found in the pillarbox default theme. When a file in the tree view is selected, its content is loaded into the theme editor for modification and previewing. ***Example*** ```html <toggle-pane-button label="Display a message"> <span>Hello World!</span> </toggle-pane-button> ```
Introduces a new `ZipWorkspace` service to allow the exporting of the current workspace as a zip. ***Example*** ```javascript // Define your workspace const workspace = [ { name: 'main.scss', content: '@import "variables"; .body { color: $primaryColor; }', type: 'scss' }, { name: 'variables.scss', content: '$primaryColor: blue;', type: 'scss' } ]; // Instantiate the zip workspace and trigger the download await new ZipWorkspace(testWorkspace).download('testWorkspace.zip'); ```
6e87939
to
91acbcb
Compare
amtins
reviewed
Apr 9, 2024
There's one use case that would be interesting to handle, it could be part of a different PR, and that's being able to change the media. Today I can't change the appearance of subtitles or live layout. |
npm offers `pre` and `post` scripts that will run automatically before or after a script. Co-authored-by: André M. <[email protected]>
amtins
approved these changes
Apr 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Resolves #4 by introducing the following features:
Changes Made
SassWorkspaceCompiler
for SASS compilation and virtual workspace management.VirtualSassImporter
to resolve import directives in a virtual file system.@srgssr/pillarbox-web
SCSS files.TogglePaneButton
component for theme editor file navigation.ZipWorkspace
service to allow the exporting of the current workspace as a zip.Checklist