Socket
Socket
Sign inDemoInstall

weex-vue-loader

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weex-vue-loader - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

lib/loader.js

@@ -244,3 +244,3 @@ // @todo: support hot reload

// output += requireString
output += '__vue_styles__.push(' + requireString + ')'
output += '__vue_styles__.push(' + requireString + ')\n'
})

@@ -247,0 +247,0 @@ }

@@ -8,2 +8,22 @@ var styler = require('weex-styler')

// @todo:
// font-relative lengths: em, ex, ch, ic
// viewport-relative lengths: vi, vb
// https://drafts.csswg.org/css-values/#lengths
var REGEXP_LENGTH = /^([-+]?[0-9]*\.?[0-9]+)(rem|vw|vh|vmin|vmax|cm|mm|q|in|pt|pc|px)$/
function convertLength (k, v) {
if (typeof v !== 'string') {
return v
}
var result = v.match(REGEXP_LENGTH)
if (result) {
if (result[2] === 'px') {
return result[1]
}
return result[1] + 'CSS_UNIT_' + result[2].toUpperCase()
}
return v
}
function genStyleString (input) {

@@ -17,3 +37,4 @@ var output = '{}'

try {
output = JSON.stringify(obj.jsonStyle, null, 2)
output = JSON.stringify(obj.jsonStyle, convertLength, 2)
.replace(/"([-+]?[0-9]*\.?[0-9]+)CSS_UNIT_([A-Z]+)"/g, '$1 * CSS_UNIT.$2')
} catch (e) {}

@@ -20,0 +41,0 @@ }

{
"name": "weex-vue-loader",
"version": "0.2.1",
"version": "0.2.2",
"description": "Vue.js component loader for Webpack",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc