gulp-parser-inline
Advanced tools
Comparing version 0.0.2-3 to 1.0.0
@@ -9,2 +9,3 @@ "use strict"; | ||
var CleanCSS = require("clean-css"); | ||
var less = require("less"); | ||
function parseCss(file, options) { | ||
@@ -21,2 +22,5 @@ var content = ''; | ||
} | ||
if (path.extname(file.path) === '.less') { | ||
content = parseLess(content); | ||
} | ||
content = parseCssContent(content, options, file); | ||
@@ -46,2 +50,8 @@ if (options.useHash) { | ||
exports.parseCss = parseCss; | ||
function parseLess(content) { | ||
less.render(content.toString(), function (e, output) { | ||
content = output.css; | ||
}); | ||
return content; | ||
} | ||
function parseCssContent(content, options, file) { | ||
@@ -48,0 +58,0 @@ var reg = /@import\s*url\(\s*['"]?([^\)]+?)(\?__inline)?['"]?\s*\)\s*[;]*/ig; |
{ | ||
"name": "gulp-parser-inline", | ||
"version": "0.0.2-3", | ||
"version": "1.0.0", | ||
"discription": "gulp-parser-inline", | ||
@@ -15,10 +15,16 @@ "scripts": { | ||
"watch": "gulp watch & npm start", | ||
"start": "npm run url && http-server ./ -c-1 -p 8077" | ||
"start": "npm run url && http-server ./ -c-1 -p 8077", | ||
"semantic-release": "semantic-release" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+http://xxx.com/demo" | ||
"url": "https://github.com/searchfe/gulp-parser-inline" | ||
}, | ||
"homepage": "http://xxx.com/demo", | ||
"homepage": "https://github.com/searchfe/gulp-parser-inline", | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^3.0.4", | ||
"@semantic-release/commit-analyzer": "^6.2.0", | ||
"@semantic-release/git": "^7.0.16", | ||
"@semantic-release/npm": "^5.1.13", | ||
"@semantic-release/release-notes-generator": "^7.2.1", | ||
"@types/clean-css": "^4.2.1", | ||
@@ -48,2 +54,3 @@ "@types/ftp": "^0.3.29", | ||
"nyc": "^13.0.1", | ||
"semantic-release": "^15.13.19", | ||
"source-map-support": "^0.5.9", | ||
@@ -58,6 +65,21 @@ "ts-jest": "^24.0.2", | ||
"dependencies": { | ||
"@types/less": "^3.0.0", | ||
"@types/replace-ext": "0.0.27", | ||
"clean-css": "^4.2.1", | ||
"gulp-util": "^3.0.8", | ||
"less": "^3.9.0", | ||
"replace-ext": "^1.0.0", | ||
"through2": "^3.0.1", | ||
"uglify-js": "^3.5.10" | ||
}, | ||
"release": { | ||
"branch": "master", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/git" | ||
] | ||
}, | ||
"engines": { | ||
@@ -64,0 +86,0 @@ "node": ">= 6.0.x" |
# gulp-parser-inline | ||
![Language](https://img.shields.io/badge/-TypeScript-blue.svg) | ||
[![Build Status](https://travis-ci.org/searchfe/gulp-parser-inline.svg?branch=master)](https://travis-ci.org/searchfe/gulp-parser-inline) | ||
[![npm package](https://img.shields.io/npm/v/gulp-parser-inline.svg)](https://www.npmjs.org/package/gulp-parser-inline) | ||
[![npm downloads](http://img.shields.io/npm/dm/gulp-parser-inline.svg)](https://www.npmjs.org/package/gulp-parser-inline) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) | ||
@@ -3,0 +8,0 @@ > gulp插件,用于处理inline语法 |
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
521568
13
15971
0
143
8
37
+ Added@types/less@^3.0.0
+ Added@types/replace-ext@0.0.27
+ Addedclean-css@^4.2.1
+ Addedless@^3.9.0
+ Addedreplace-ext@^1.0.0
+ Added@types/less@3.0.7(transitive)
+ Added@types/replace-ext@0.0.27(transitive)
+ Addedclean-css@4.2.4(transitive)
+ Addedcopy-anything@2.0.6(transitive)
+ Addederrno@0.1.8(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedimage-size@0.5.5(transitive)
+ Addedis-what@3.14.1(transitive)
+ Addedless@3.13.1(transitive)
+ Addedmake-dir@2.1.0(transitive)
+ Addedmime@1.6.0(transitive)
+ Addednative-request@1.1.2(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedprr@1.0.1(transitive)
+ Addedreplace-ext@1.0.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedtslib@1.14.1(transitive)