@joplin/htmlpack
Advanced tools
Comparing version 2.13.4 to 2.14.1
@@ -16,4 +16,3 @@ "use strict"; | ||
const Datauri = require('datauri/sync'); | ||
const cssParse = require('css/lib/parse'); | ||
const cssStringify = require('css/lib/stringify'); | ||
const css_tools_1 = require("@adobe/css-tools"); | ||
const selfClosingElements = [ | ||
@@ -74,3 +73,3 @@ 'area', | ||
const processCssContent = (cssBaseDir, content) => { | ||
const o = cssParse(content, { | ||
const o = (0, css_tools_1.parse)(content, { | ||
silent: false, | ||
@@ -81,2 +80,5 @@ }); | ||
for (const declaration of rule.declarations) { | ||
if (declaration.type === css_tools_1.CssTypes.comment) { | ||
continue; | ||
} | ||
if (declaration.property === 'src') { | ||
@@ -96,3 +98,3 @@ declaration.value = declaration.value.replace(/url\((.*?)\)/g, (_v, url) => { | ||
} | ||
return cssStringify(o); | ||
return (0, css_tools_1.stringify)(o); | ||
}; | ||
@@ -99,0 +101,0 @@ const processLinkTag = (baseDir, _name, attrs) => { |
{ | ||
"name": "@joplin/htmlpack", | ||
"version": "2.13.4", | ||
"version": "2.14.1", | ||
"description": "Pack an HTML file and all its linked resources into a single HTML file", | ||
@@ -17,12 +17,12 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@joplin/fork-htmlparser2": "^4.1.50", | ||
"css": "3.0.0", | ||
"@adobe/css-tools": "4.3.2", | ||
"@joplin/fork-htmlparser2": "^4.1.51", | ||
"datauri": "4.1.0", | ||
"fs-extra": "11.1.1", | ||
"fs-extra": "11.2.0", | ||
"html-entities": "1.4.0" | ||
}, | ||
"devDependencies": { | ||
"@types/fs-extra": "11.0.3" | ||
"@types/fs-extra": "11.0.4" | ||
}, | ||
"gitHead": "7c24a2f4bead520b5782cdc08635c104eedffa81" | ||
"gitHead": "5aba5e544d2e7884fb18b447652d1f50ecc74fe7" | ||
} |
@@ -5,4 +5,3 @@ import * as fs from 'fs-extra'; | ||
const Datauri = require('datauri/sync'); | ||
const cssParse = require('css/lib/parse'); | ||
const cssStringify = require('css/lib/stringify'); | ||
import { CssTypes, parse as cssParse, stringify as cssStringify } from '@adobe/css-tools'; | ||
@@ -76,2 +75,6 @@ const selfClosingElements = [ | ||
for (const declaration of rule.declarations) { | ||
if (declaration.type === CssTypes.comment) { | ||
continue; | ||
} | ||
if (declaration.property === 'src') { | ||
@@ -78,0 +81,0 @@ declaration.value = declaration.value.replace(/url\((.*?)\)/g, (_v: any, url: string) => { |
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
17424
438
+ Added@adobe/css-tools@4.3.2
+ Added@adobe/css-tools@4.3.2(transitive)
+ Addedfs-extra@11.2.0(transitive)
- Removedcss@3.0.0
- Removedatob@2.1.2(transitive)
- Removedcss@3.0.0(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removedfs-extra@11.1.1(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-resolve@0.6.0(transitive)
Updatedfs-extra@11.2.0