hashicorp / structure

Structure (aka "PDS") [deprecated]
https://hashicorp-structure.vercel.app
Mozilla Public License 2.0
24 stars 5 forks source link

F sass filtering #5

Closed meirish closed 3 years ago

meirish commented 4 years ago

This enables filtering of Sass files from the component directory into a file that you can then include in the app's scss file. Sass files will get dynamically added to it as you change the config for what components are included.

The last commit here shows how to use this and isn't meant to stay in for merge. I really just wanted to open this for discussion as I think moving Sass files to a folder that then gets filtered to a specific location is likely more straightforward.

The overview of how it works is this: Consuming apps can use the structure sass directly via https://github.com/simonexmachina/ember-cli-sass#alternative-addon-usage.

Components also use structure via @use structure/.. directives.

During the build, components you have opted to include get their .scss files copied over to app/styles: https://github.com/hashicorp/structure/pull/5/files#diff-0703d2837081697b3b02d8cb1af3b972R64, and a file named structure-comonents is generated that @forwards each component sass file. Including @use structure-components in app.scss then includes all of the component styles in your app.

Questions: Does this make sense? Should component files get copied to the structure dir instead of app/styles? If they do get copied to structure dir, does that make authoring strange because of the relative imports?

CITguy commented 3 years ago

Closing PR. The structure-core package was dropped in #8.