+1
-1
| { | ||
| "name": "rework", | ||
| "version": "0.20.0", | ||
| "version": "0.20.1", | ||
| "description": "CSS manipulations built on CSSOM", | ||
@@ -5,0 +5,0 @@ "keywords": ["css", "manipulation", "preprocess", "transform"], |
+5
-0
@@ -0,1 +1,6 @@ | ||
| 0.20.1 / 2013-12-23 | ||
| =================== | ||
| * fix last tag. please ignore 0.20.0. thank you for your cooperation. | ||
| 0.20.0 / 2013-12-23 | ||
@@ -2,0 +7,0 @@ =================== |
+26
-4
@@ -33,2 +33,3 @@ | ||
| * @param {String} str | ||
| * @param {Object} options | ||
| * @return {Rework} | ||
@@ -38,4 +39,6 @@ * @api public | ||
| function rework(str) { | ||
| return new Rework(css.parse(str)); | ||
| function rework(str, options) { | ||
| options = options || {}; | ||
| options.position = true; // we need this for sourcemaps | ||
| return new Rework(css.parse(str, options)); | ||
| } | ||
@@ -94,6 +97,25 @@ | ||
| Rework.prototype.toString = function(options){ | ||
| return css.stringify(this.obj, options); | ||
| options = options || {}; | ||
| var result = css.stringify(this.obj, options); | ||
| if (options.sourcemap && !options.sourcemapAsObject) { | ||
| result = result.code + '\n' + sourcemapToComment(result.map); | ||
| } | ||
| return result; | ||
| }; | ||
| /** | ||
| * Convert sourcemap to base64-encoded comment | ||
| * | ||
| * @param {Object} map | ||
| * @return {String} | ||
| * @api private | ||
| */ | ||
| function sourcemapToComment(map) { | ||
| var convertSourceMap = require('convert-source-map'); | ||
| var content = convertSourceMap.fromObject(map).toBase64(); | ||
| return '/*# sourceMappingURL=data:application/json;base64,' + content + ' */'; | ||
| } | ||
| /** | ||
| * Expose plugins. | ||
@@ -137,2 +159,2 @@ */ | ||
| function noop(){} | ||
| function noop(){} |
+9
-3
| { | ||
| "name": "rework", | ||
| "version": "0.20.0", | ||
| "version": "0.20.1", | ||
| "description": "CSS manipulations built on CSSOM", | ||
| "keywords": ["css", "manipulation", "preprocess", "transform"], | ||
| "keywords": [ | ||
| "css", | ||
| "manipulation", | ||
| "preprocess", | ||
| "transform" | ||
| ], | ||
| "author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -19,3 +24,4 @@ "repository": { | ||
| "rework-inherit": "0.2.1", | ||
| "rework-visit": "1.0.0" | ||
| "rework-visit": "1.0.0", | ||
| "convert-source-map": "~0.3.1" | ||
| }, | ||
@@ -22,0 +28,0 @@ "devDependencies": { |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
35507
2.4%676
3.21%0
-100%9
12.5%+ Added
+ Added