Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit e260dcd

Browse files
thghznck
authored andcommitted
Update comments
1 parent 0915832 commit e260dcd

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

dist/rollup-plugin-vue.common.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function vue (options) {
168168
if ( options === void 0 ) options = {};
169169

170170
var filter = rollupPluginutils.createFilter(options.include, options.exclude)
171-
var cssMap = {}
171+
var cssContent = {}
172172
var cssLang = {}
173173
var dest = 'bundle.js'
174174

@@ -185,23 +185,23 @@ function vue (options) {
185185

186186
var ref = vueTransform(source, id)
187187

188-
// Map of every stylesheet
189-
cssMap[id] = ref.css || ''
188+
// Map of every stylesheet content
189+
cssContent[id] = ref.css || ''
190190

191-
// Last custom style language
191+
// Map of every stylesheet lang
192192
cssLang[id] = ref.cssLang || 'css'
193193

194-
// Script with inlined template
194+
// Component javascript with inlined html template
195195
return ref.js
196196
},
197197
banner: function banner () {
198198
// Abusing the banner method to write styles
199199
var count = 0
200-
for (var key in cssMap) {
201-
count += cssMap[key].length
200+
for (var key in cssContent) {
201+
count += cssContent[key].length
202202
}
203203
if (count) {
204-
writeStyles(cssMap, cssLang, dest)
204+
writeStyles(cssContent, cssLang, dest)
205205
}
206206
return ''
207207
}

src/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import writeStyles from './writeStyles'
44

55
export default function vue (options = {}) {
66
let filter = createFilter(options.include, options.exclude)
7-
let cssMap = {}
7+
let cssContent = {}
88
let cssLang = {}
99
let dest = 'bundle.js'
1010

@@ -21,23 +21,23 @@ export default function vue (options = {}) {
2121

2222
var ref = vueTransform(source, id)
2323

24-
// Map of every stylesheet
25-
cssMap[id] = ref.css || ''
24+
// Map of every stylesheet content
25+
cssContent[id] = ref.css || ''
2626

27-
// Last custom style language
27+
// Map of every stylesheet lang
2828
cssLang[id] = ref.cssLang || 'css'
2929

30-
// Script with inlined template
30+
// Component javascript with inlined html template
3131
return ref.js
3232
},
3333
banner () {
3434
// Abusing the banner method to write styles
3535
var count = 0
36-
for (let key in cssMap) {
37-
count += cssMap[key].length
36+
for (let key in cssContent) {
37+
count += cssContent[key].length
3838
}
3939
if (count) {
40-
writeStyles(cssMap, cssLang, dest)
40+
writeStyles(cssContent, cssLang, dest)
4141
}
4242
return ''
4343
}

0 commit comments

Comments
 (0)