weex-vue-loader
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -58,3 +58,3 @@ // @todo: support hot reload | ||
var loaderContext = this | ||
var query = loaderUtils.parseQuery(this.query) | ||
var query = loaderUtils.getOptions(this) | ||
var params = loaderUtils.parseQuery(this.resourceQuery) | ||
@@ -61,0 +61,0 @@ var options = this.options.__vueOptions__ = Object.assign({}, this.options.vue, this.vue, query) |
@@ -7,3 +7,3 @@ var path = require('path') | ||
this.cacheable() | ||
var query = loaderUtils.parseQuery(this.query) | ||
var query = loaderUtils.getOptions(this) | ||
var filename = path.basename(this.resourcePath) | ||
@@ -10,0 +10,0 @@ var parts = parse(content, filename, this.sourceMap) |
@@ -5,3 +5,3 @@ var styler = require('weex-styler') | ||
this.cacheable && this.cacheable() | ||
return 'module.exports = ' + genStyleString(content) | ||
return 'module.exports = ' + genStyleString(content, this) | ||
} | ||
@@ -29,3 +29,3 @@ | ||
function genStyleString (input) { | ||
function genStyleString (input, loader) { | ||
var output = '{}' | ||
@@ -37,2 +37,11 @@ styler.parse(input, function (err, obj) { | ||
if (obj && obj.jsonStyle) { | ||
if (obj.log) { | ||
obj.log.map((log) => { | ||
if (log.selectors) { | ||
loader.emitWarning(`${log.selectors}: ${log.reason}`) | ||
} else { | ||
loader.emitWarning(`${log.reason}`) | ||
} | ||
}) | ||
} | ||
try { | ||
@@ -39,0 +48,0 @@ output = JSON.stringify(obj.jsonStyle, convertLength, 2) |
@@ -44,3 +44,3 @@ var postcss = require('postcss') | ||
loaderUtils.parseQuery(this.query) | ||
loaderUtils.getOptions(this) | ||
var options = this.options.__vueOptions__ | ||
@@ -47,0 +47,0 @@ var postcssOptions = options.postcss |
@@ -57,3 +57,3 @@ // @todo: support hot reload | ||
var isProduction = this.minimize || process.env.NODE_ENV === 'production' | ||
var query = loaderUtils.parseQuery(this.query) | ||
var query = loaderUtils.getOptions(this) | ||
// var isServer = this.options.target === 'node' | ||
@@ -60,0 +60,0 @@ // var isServer = false |
@@ -8,3 +8,3 @@ var cons = require('consolidate') | ||
var callback = this.async() | ||
var opt = loaderUtils.parseQuery(this.query) | ||
var opt = loaderUtils.getOptions(this) | ||
var vue = this.options.__vueOptions__ | ||
@@ -11,0 +11,0 @@ if (vue && vue.template) { |
{ | ||
"name": "weex-vue-loader", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Vue.js component loader for Webpack", | ||
@@ -36,3 +36,2 @@ "main": "index.js", | ||
"js-beautify": "^1.6.3", | ||
"loader-utils": "^0.2.10", | ||
"lru-cache": "^4.0.1", | ||
@@ -48,3 +47,3 @@ "object-assign": "^4.0.0", | ||
"weex-styler": "^0.3.0", | ||
"weex-template-compiler": "^2.5.4-weex.0" | ||
"weex-template-compiler": "^2.5.11-weex.0" | ||
}, | ||
@@ -70,2 +69,3 @@ "peerDependencies": { | ||
"jsdom": "^9.2.1", | ||
"loader-utils": "^1.1.0", | ||
"memory-fs": "^0.3.0", | ||
@@ -72,0 +72,0 @@ "mkdirp": "^0.5.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
30202
16
771
0
28
+ Addedacorn@5.7.4(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addedescodegen@1.14.3(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedestraverse@4.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedprelude-ls@1.1.2(transitive)
+ Addedtype-check@0.3.2(transitive)
+ Addedweex-template-compiler@2.5.11-weex.2(transitive)
+ Addedword-wrap@1.2.5(transitive)
- Removedloader-utils@^0.2.10
- Removedbig.js@3.2.0(transitive)
- Removedemojis-list@2.1.0(transitive)
- Removedjson5@0.5.1(transitive)
- Removedloader-utils@0.2.17(transitive)
- Removedweex-template-compiler@2.5.4-weex.0(transitive)