fix eslint
diff --git a/src/extract.js b/src/extract.js
index d103e3f..244fea4 100644
--- a/src/extract.js
+++ b/src/extract.js
@@ -33,25 +33,25 @@
if (this.sourceMap &&
(type === 'scripts' || type === 'elements')) {
const contentLineStart = result.line
- let contentLineCount = 0
+ // let contentLineCount = 0
let cmap
if (inputSourceMap) {
cmap = consumeMap(this, source, inputSourceMap)
source = cmap.sourcesContent.join('')
- // printSourceWithLine(source)
+ // printSourceWithLine(source)
}
const iterator = splitSourceLine(content)
.map((input, line) => {
- contentLineCount++
+ // contentLineCount++
line = line + 1
let originalLine = line + contentLineStart
const generatedLine = line
if (cmap) {
// mapping to the original of input source
originalLine = cmap.mapping[`line-${originalLine}-column-0`].line
- // console.log(originalLine + ':', input)
+ // console.log(originalLine + ':', input)
}
return {
original: {
diff --git a/src/loader.js b/src/loader.js
index e20c3b0..4f49781 100644
--- a/src/loader.js
+++ b/src/loader.js
@@ -221,7 +221,7 @@
const isEntry = resourceQuery.entry
const filename = path.relative('.', resourcePath)
const name = isEntry ? md5(fs.readFileSync(filename)) :
- (resourceQuery.name ||
+ (resourceQuery.name ||
getNameByPath(resourcePath))
let output = ''
@@ -244,14 +244,14 @@
}
output += getRequireString(
- this,
- getLoaderString('element', {
- customLang,
- name: element.name,
- source: element.src
- }),
- `${src}?name=${element.name}`
- )
+ this,
+ getLoaderString('element', {
+ customLang,
+ name: element.name,
+ source: element.src
+ }),
+ `${src}?name=${element.name}`
+ )
}
}
@@ -261,10 +261,10 @@
if (elementNames.indexOf(dep) < 0
&& fs.existsSync(filepath)) {
output += getRequireString(
- this,
- getLoaderString('none'),
- `./${dep}.we`
- )
+ this,
+ getLoaderString('none'),
+ `./${dep}.we`
+ )
}
}
}
@@ -368,20 +368,20 @@
output += `
__weex_define__('@weex-component/${name}', [], function(__weex_require__, __weex_exports__, __weex_module__) {
` + (
- frag.script.length > 0 ? `
+ frag.script.length > 0 ? `
__weex_script__(__weex_module__, __weex_exports__, __weex_require__)
if (__weex_exports__.__esModule && __weex_exports__.default) {
__weex_module__.exports = __weex_exports__.default
}
` : ''
-) +
+ ) +
`
__weex_module__.exports.template = __weex_template__
` + (
- frag.style.length > 0 ? `
+ frag.style.length > 0 ? `
__weex_module__.exports.style = __weex_style__
` : ''
-) + `
+ ) + `
})
`
if (isEntry) {
diff --git a/src/util.js b/src/util.js
index f19f2da..aab43b4 100644
--- a/src/util.js
+++ b/src/util.js
@@ -45,10 +45,10 @@
export function getRequireString (loaderContext, loader, filepath) {
return 'require(' +
loaderUtils.stringifyRequest(
- loaderContext,
- loader ?
- `!!${loader}!${filepath}` :
- `${filepath}`
+ loaderContext,
+ loader ?
+ `!!${loader}!${filepath}` :
+ `${filepath}`
) +
')\n'
}
@@ -156,8 +156,8 @@
export function printSourceWithLine (source) {
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
source = splitSourceLine(source)
- .map((input, line) => {
- console.log(line + 1 + ':', input)
- })
+ .map((input, line) => {
+ console.log(line + 1 + ':', input)
+ })
console.log('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<')
}