Skip to content

Option to render CSS into component - #1

Merged
p3k merged 4 commits into
weblyzard:masterfrom
p3k:master
Jun 19, 2018
Merged

Option to render CSS into component #1
p3k merged 4 commits into
weblyzard:masterfrom
p3k:master

Conversation

@p3k

@p3k p3k commented Jun 19, 2018

Copy link
Copy Markdown
Member

This PR adds the option less.component to the RequireJS config and – if set to true – renders the LESS code as CSS into the component where it was required from.

We are currently using this to enable LESS in RactiveJS components.

Example:

import Ractive from 'ractive';
import css from 'less!./App';
import template from 'text!./App.html';

const App = Ractive.extend({
  template,
  css
});

export { App };

Would be glad if you considered this, please let me know what you think.

@p3k
p3k merged commit 9458e91 into weblyzard:master Jun 19, 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