Skip to content

Commit 69eb2ac

Browse files
authored
Update README.md
1 parent 320f584 commit 69eb2ac

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,28 @@ For developers who want to take advantage of the **.vue** file but would prefer
1313

1414

1515
## Usage:
16-
First include script tag for .vue files, then include vueify.js
17-
Set `type='vue'` on script tags for .vue files, because browser won't load scripts with unknown type by default.
16+
First include script tags linked to .vue files, then include vueify.js
17+
18+
Set `type='vue'` for our script tags, because browser won't automatically load content in script tags with unknown type.
1819

1920
```html
2021
<script src="Hello.vue" type='vue'></script>
2122
<script src="vueify.js"></script>
2223
```
2324

24-
Vue' SFC loaded this way will be registered globally under the its SFC file name or the name user specified in script tag.
25+
SFC loaded this way will be registered globally under the its SFC file name or the name user specified in script tag.
2526

2627
```html
2728
<script src="Hello.vue" type='vue' name='custom-name'></script>
2829
```
2930

3031

3132
## How It Works:
32-
`vueify.js` first scans all script tags with `type=vue`, then loads .vue files from remote server and compiles their contents into corresponding css/js to be dynamically injected to web page.
33+
`vueify.js` will first scan document for script tags with `type=vue`, gather url for .vue files.
34+
35+
It then downloads and transpiles these .vue files and their dependent .vue files(from `import`) into ES6-compatible javascript.
36+
37+
We refer to .vue files inside script tags as root-level therefore they will be automatically loaded as global Vue components by `vueify.js`. Users are responsible for registering any children Vue component inside these .vue files.
3338

3439

3540
## Example:
@@ -83,5 +88,6 @@ Then write your html like this:
8388
* Please verify that `vueify.js` loads after `vue.js` and `*.vue`.
8489
* No custom lang support ~~lang="coffee"~~ in .vue.
8590
* Use ES6's `import/export` for nested components, CommonJS's `require/module.exports` is not currently supported.
91+
* Cyclic dependency in .vue file will cause transpile error.
8692
* Refer TODOs in source code for future improvements.
87-
* Contributions are welcome! Just submit a PR ;)
93+
* Contributions are always welcome! Just submit a PR ;)

0 commit comments

Comments
 (0)