gulp-parser-inline
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -0,1 +1,8 @@ | ||
## [1.6.1](https://github.com/searchfe/gulp-parser-inline/compare/v1.6.0...v1.6.1) (2019-11-06) | ||
### Bug Fixes | ||
* remove fast-json ([447ca53](https://github.com/searchfe/gulp-parser-inline/commit/447ca535ef31d281a274724bc475e9e8a1220a2f)) | ||
# [1.6.0](https://github.com/searchfe/gulp-parser-inline/compare/v1.5.0...v1.6.0) (2019-11-04) | ||
@@ -2,0 +9,0 @@ |
@@ -71,3 +71,2 @@ "use strict"; | ||
function parseCssContent(content, options, file) { | ||
console.time('parseCssContent'); | ||
debug('parse content', file.path); | ||
@@ -122,5 +121,4 @@ /* eslint-disable */ | ||
console.log('filePath', file.path); | ||
console.timeEnd('parseCssContent'); | ||
return content; | ||
} | ||
exports.parseCssContent = parseCssContent; |
@@ -60,3 +60,2 @@ "use strict"; | ||
function parseJSContent(content, options, file) { | ||
console.time('parseJSContent'); | ||
debug('parse content', file.path); | ||
@@ -117,5 +116,4 @@ /* eslint-disable */ | ||
console.log('parseJSContent filepath: ', file.path); | ||
console.timeEnd('parseJSContent'); | ||
return content; | ||
} | ||
exports.parseJSContent = parseJSContent; |
@@ -12,3 +12,2 @@ "use strict"; | ||
function parseTpl(file, options) { | ||
console.time('parseTpl'); | ||
debug('input file', file.path); | ||
@@ -30,3 +29,2 @@ var content = ''; | ||
console.log('parseTpl filePath', file.path); | ||
console.timeEnd('parseTpl'); | ||
return content; | ||
@@ -33,0 +31,0 @@ } |
@@ -7,8 +7,2 @@ "use strict"; | ||
var path = require("path"); | ||
var parseJson = require("fast-json-parse"); | ||
var fastJson = require("fast-json-stringify"); | ||
var stringify = fastJson({ | ||
title: 'Example Schema', | ||
type: 'object' | ||
}); | ||
var debug = debug_1.default('inline:utils'); | ||
@@ -27,12 +21,9 @@ function isInline(url) { | ||
function getFileDataFromResourceMap(key, sourceMapPath) { | ||
console.time('read source'); | ||
key = path.relative(process.cwd(), key); | ||
if (fs.existsSync(sourceMapPath)) { | ||
var fileContent = fs.readFileSync(sourceMapPath, 'utf-8'); | ||
var fileObj = parseJson(fileContent || '{}'); | ||
var fileObj = JSON.parse(fileContent || '{}'); | ||
debug('getFile: ' + key + '; Data: ', fileObj[key] ? fileObj[key] : 'null'); | ||
console.timeEnd('read source'); | ||
return fileObj[key] ? fileObj[key] : {}; | ||
} | ||
console.timeEnd('read source'); | ||
return {}; | ||
@@ -42,6 +33,5 @@ } | ||
function writeMap(key, value, sourceMapPath) { | ||
console.time('writeMap'); | ||
var obj = {}; | ||
if (fs.existsSync(sourceMapPath)) { | ||
obj = parseJson(fs.readFileSync(sourceMapPath).toString()); | ||
obj = JSON.parse(fs.readFileSync(sourceMapPath).toString()); | ||
} | ||
@@ -54,4 +44,3 @@ // if (value.md5) { | ||
debug('writeFile: ' + key + '; data: ', obj[key].output); | ||
fs.writeFileSync(sourceMapPath, stringify(obj), 'utf-8'); | ||
console.timeEnd('writeMap'); | ||
fs.writeFileSync(sourceMapPath, JSON.stringify(obj), 'utf-8'); | ||
} | ||
@@ -58,0 +47,0 @@ exports.writeMap = writeMap; |
{ | ||
"name": "gulp-parser-inline", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"discription": "gulp-parser-inline", | ||
@@ -81,4 +81,2 @@ "scripts": { | ||
"escape-html": "^1.0.3", | ||
"fast-json-parse": "^1.0.3", | ||
"fast-json-stringify": "^1.15.6", | ||
"gulp-util": "^3.0.8", | ||
@@ -85,0 +83,0 @@ "html-minifier": "^4.0.0", |
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
13
590654
17502
- Removedfast-json-parse@^1.0.3
- Removedfast-json-stringify@^1.15.6
- Removedajv@6.12.6(transitive)
- Removeddeepmerge@4.3.1(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-parse@1.0.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfast-json-stringify@1.21.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedstring-similarity@4.0.4(transitive)
- Removeduri-js@4.4.1(transitive)