Skip to content
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

Support for CSS/JavaScript processors #25

Open
hagenburger opened this issue Aug 18, 2018 · 0 comments
Open

Support for CSS/JavaScript processors #25

hagenburger opened this issue Aug 18, 2018 · 0 comments
Labels
enhancement New feature or request specification-needed Help finishing the specification before working on this
Milestone

Comments

@hagenburger
Copy link
Owner

Define a way to integrate processors for CSS and JavaScript. Those could be: PostCSS, Sass/SCSS, Less, Coffee-Script, Babel, …

Current situation

CSS and JavaScript can be added via:

document.contents.add('css', 'a { color: blue }')
document.contents.add('javascript', 'alert("Hello world")')

And retrieved via:

document.contents.get('css')
document.contents.get('javascript')

Pre processors

Languages that require a preprocessor (for example Sass, SCSS, Less, Coffee-Script), must use their own content type:

document.contents.add('scss', 'a { color: lighten(blue, 10%) }')

Those need a hook to be converted into either CSS or JavaScript before rendering the document.

“Post” processors

Autoprefixer and BabelJS should convert either CSS or JavaScript after the pre processors have been converted and before the document gets rendered.

Open questions

  • Where and how to define them?
@hagenburger hagenburger added enhancement New feature or request specification-needed Help finishing the specification before working on this labels Aug 18, 2018
@hagenburger hagenburger added this to the v1.0.0 milestone Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request specification-needed Help finishing the specification before working on this
Projects
None yet
Development

No branches or pull requests

1 participant