Skip to content

Flesh out broccoli-css-blocks plugin. #87

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

Closed
wants to merge 1 commit into from

Conversation

amiller-gh
Copy link
Contributor

Still a number of outstanding QUESTIONs and TODOs. See code comments for details.

@amiller-gh amiller-gh changed the base branch from master to analyzer_update April 11, 2018 18:29

return this.analyzer;
// Write our compiled CSS to the output tree.
// QUESTION: GUH! TOM! THIS DOESN'T APPEAR IN THE OUTPUT TREE!
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the biggest problem that I don't quite understand 🙂
I'm trying to write the compiled CSS file out to the source tree, and I can see it in CSS Blocks' output tmp directory, but by the time the final project is dumped out to /dist it disappears again. I'm assuming I'm just not placing it in the correct spot in the output tree. Any insight?

// We're just analyzing right now.
let files = await readdirAsync(this.inputPaths[0]);
// This build step is *mostly* just a pass-through of all files!
// QUESTION: Tom, is there a better way to do this in Broccoli?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aka, "hey broccoli, recursively symlink every file for me, but make sure the directories are all real so I'm not editing someone else's output tree by accident – or worse, the source files!

let styleMapping = new StyleMapping<"Opticss.Template">(optimized.styleMapping, blocks, options, this.analyzer.analyses());

// Attach all computed data to our magic shared memory transport object...
this.transport.mapping = styleMapping;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all hand-wave-y shared state between Rewriters and Analyzers. Chris and I are still settling on a proper way to handle this for all build types – this is in a "just get it to work" state and will be cleaned up before landing.

@chrisrng chrisrng mentioned this pull request Apr 16, 2018
@amiller-gh
Copy link
Contributor Author

Superseded by #90

@amiller-gh amiller-gh closed this Apr 18, 2018
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.

1 participant