Open hagenburger opened 6 years ago
Define a way to integrate processors for CSS and JavaScript. Those could be: PostCSS, Sass/SCSS, Less, Coffee-Script, Babel, …
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')
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.
Autoprefixer and BabelJS should convert either CSS or JavaScript after the pre processors have been converted and before the document gets rendered.
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:
And retrieved via:
Pre processors
Languages that require a preprocessor (for example Sass, SCSS, Less, Coffee-Script), must use their own content type:
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