weex-styler
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -472,2 +472,7 @@ var util = require('./util') | ||
var TRANSFORM_VALIDATOR = function TRANSFORM_VALIDATOR (v) { | ||
// TODO | ||
return { value: v } | ||
} | ||
/** | ||
@@ -572,2 +577,5 @@ * generate a function to check whether a value is in `list` | ||
}, | ||
transform: { | ||
transform: TRANSFORM_VALIDATOR | ||
}, | ||
customized: { | ||
@@ -574,0 +582,0 @@ textColor: COLOR_VALIDATOR, |
{ | ||
"name": "weex-styler", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Weex <style> transformer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -96,2 +96,18 @@ var chai = require('chai') | ||
it('parse transition transform', function (done) { | ||
var code = '.foo {transition-property: transform; transition-duration: 300ms; transition-delay: 0.2s; transition-timing-function: ease-in-out;}' | ||
styler.parse(code, function (err, data) { | ||
expect(err).is.undefined | ||
expect(data).is.an.object | ||
expect(data.jsonStyle['@TRANSITION']).eql({foo: {property: 'transform', duration: 300, delay: 200, timingFunction: 'ease-in-out'}}) | ||
expect(data.jsonStyle.foo).eql({ | ||
transitionDelay: 200, | ||
transitionDuration: 300, | ||
transitionProperty: "transform", | ||
transitionTimingFunction: "ease-in-out" | ||
}) | ||
done() | ||
}) | ||
}) | ||
it('parse multi transition properties', function (done) { | ||
@@ -98,0 +114,0 @@ var code = '.foo {transition-property: margin-top, height; transition-duration: 300ms; transition-delay: 0.2s; transition-timing-function: ease-in-out;}' |
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
55547
1540