Compare commits

..

No commits in common. "master" and "1.0.1" have entirely different histories.

8 changed files with 6 additions and 11012 deletions

View file

@ -142,7 +142,6 @@ GradientParser.stringify = (function() {
if (!element) {
return '';
}
var result = '';
if (element instanceof Array) {
return visitor.visit_array(element, result);

View file

@ -491,7 +491,6 @@ GradientParser.stringify = (function() {
if (!element) {
return '';
}
var result = '';
if (element instanceof Array) {
return visitor.visit_array(element, result);

View file

@ -11,7 +11,7 @@ GradientParser.parse = (function() {
repeatingLinearGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,
radialGradient: /^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,
repeatingRadialGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,
sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,
extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
positionKeywords: /^(left|center|right|top|bottom)/i,
pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,

View file

@ -142,7 +142,6 @@ GradientParser.stringify = (function() {
if (!element) {
return '';
}
var result = '';
if (element instanceof Array) {
return visitor.visit_array(element, result);

10999
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "gradient-parser",
"version": "1.0.2",
"version": "1.0.1",
"description": "Parse CSS3 gradient definitions and return an AST.",
"author": {
"name": "Rafael Carcicio",
@ -32,8 +32,8 @@
"css3",
"parser"
],
"dependencies": {},
"devDependencies": {
"expect.js": "*",
"grunt": "*",
"grunt-browserify": "^3.0.1",
"grunt-complexity": "*",

View file

@ -1,7 +1,7 @@
'use strict';
var expect = require('expect.js');
var gradients = require('../build/node');
var gradients = require('build/node');
describe('lib/parser.js', function () {
@ -134,11 +134,7 @@ describe('lib/parser.js', function () {
describe('parse all linear directional', function() {
[
{type: 'angular', unparsedValue: '-145deg', value: '-145'},
{type: 'directional', unparsedValue: 'to left top', value: 'left top'},
{type: 'directional', unparsedValue: 'to top left', value: 'top left'},
{type: 'directional', unparsedValue: 'to top right', value: 'top right'},
{type: 'directional', unparsedValue: 'to bottom left', value: 'bottom left'},
{type: 'directional', unparsedValue: 'to bottom right', value: 'bottom right'}
{type: 'directional', unparsedValue: 'to left top', value: 'left top'}
].forEach(function(orientation) {
describe('parse orientation ' + orientation.type, function() {
beforeEach(function() {

View file

@ -1,7 +1,7 @@
'use strict';
var expect = require('expect.js');
var gradients = require('../build/node');
var gradients = require('build/node');
function pprint(ast) {
console.log(JSON.stringify(ast, true, 2));