Export separate file with SCSS variables, functions and mixins (variables.scss) for library users #217
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.
In madoar/angular-archwizard-demo#40 (comment), it became apparent that angular-archwizard should export a separate file with SCSS variables so that this file can be safely imported into component's style file without causing style duplication.
One option would be reorganize source *.scss files so that they could be exported as is. It would simplify the build process (
scss-merge
would no longer be necessary), but on the other hand all styles would need to be placed into just two files (archwizard.scss
andvariables.scss
), which I find limiting and not very convenient for development. The reason why we have build tools is to structure the source files the way we need.Another option, which I went for, is to enhance the build process to extract the file with variables automatically. I did not find a ready-to-use script which would suit this purpose perfectly, so I wrote my own little tool:
I did my best to make this project as robust as possible (with unit tests etc.), so hopefully it is acceptable to add this project as development dependency to angular-archwizard.