Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Commit

Permalink
support styles
Browse files Browse the repository at this point in the history
  • Loading branch information
SeregPie committed Mar 8, 2018
1 parent 8c19900 commit 0a5dc58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ Separate files.
```html
<template src="./template.html"></template>
<script src="./script.js"></script>
<style src="./style.layout.css"></style>
<style src="./style.theme.green-forest.css"></style>
```

## todo

- style
- scoped style
- preProcessors
- postProcessors
2 changes: 1 addition & 1 deletion VueInBrowserLoader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Document_createElement from 'x/src/Document/createElement';
import Lang_localEval from 'x/src/Lang/localEval';
import Object_hasOwn from 'x/src/Object/hasOwn';
import Url_join from 'x/src/Url/join';
Expand Down Expand Up @@ -37,6 +38,9 @@ let VueInBrowserLoader = function(componentUrl) {
if (template) {
Object.assign(options, {template});
}
styles.forEach(style => {
document.head.appendChild(Document_createElement('style', style));
});
return options;
})
);
Expand Down

0 comments on commit 0a5dc58

Please sign in to comment.