-
Notifications
You must be signed in to change notification settings - Fork 47
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
[discussion] refactor api #32
Comments
I'm about to go to sleep :) But quickly:
This doesn't need to be specific to template strings, you could just do: const prefix = sheetify(`
/* Inline CSS */
`, { inline: true }) Then there's no need to depend on ES6 syntax, and you now have one API instead of two 🎉 |
so keen, this is exactly where i'd like to go with |
@hughsk I think that's a reasonable proposal; I agree we should adopt that syntax. I'd be happy to see |
from #16, might want to add the ability to an open question is whether we specify any default plugins, such as what |
Yeah, I reckon directly consuming I'm cool with adding |
after talking to @hughsk in person, I have come to agree that using I'm not sure I'm doing a great job at explaining this, but I hope it makes sense. |
I've created separate issues for all todo's mentioned in this thread. I'm sure as we implement it all, new issues will arise. So I'm closing this issue for now as we've resolved this discussion into concrete actionables ✨ If I've missed anything tho, don't hesitate to reopen. |
supersedes #31
current status
sheetify
's api is a bit all over the place. Currently we support:js
andpackage.json
styles)When sheetify was first written, it served as an alternative to
LESS
andSASS
. The current version aims to provide namespaces as abrowserify
transform andimport
dependency resolution to arbitrary preprocessors (never fully implemented).proposal
I propose we refactor the api to work optimally for the current goals. This way we can shrink the code base, provide a more coherent story to users and generally improve the usefulness of the tool.
The changes I'd like to see are:
cli
api - other preprocessors have cli's that can be used directlyjs callback
andjs stream
api - other preprocessors have api's that can be used directlyreset.css
) (iirc @hughsk had ideas for this)caveats
sheetify
can no longer be used as a linker; this was never fully implemented but would no longer be possiblesheetify
becomes dependent onbrowserify
- imo that's a good thing as that is where the value is added.webpack
support could be added through an externalbrowserify -> webpack
adapterI hope I'm making sense with this all; I'd be happy to see
sheetify
progress down the path to simplification.cc/ @hughsk @ahdinosaur I'd be keen to hear your thoughts on this
The text was updated successfully, but these errors were encountered: