Comparing version 0.0.26 to 0.1.0
{ | ||
"name": "beasties", | ||
"version": "0.0.26", | ||
"version": "0.1.0", | ||
"description": "Inline critical CSS and lazy-load the rest.", | ||
"main": "dist/beasties.js", | ||
"module": "dist/beasties.mjs", | ||
"source": "src/index.js", | ||
"exports": { | ||
"import": "./dist/beasties.mjs", | ||
"require": "./dist/beasties.js", | ||
"default": "./dist/beasties.mjs" | ||
}, | ||
"typings": "src/index.d.ts", | ||
"files": [ | ||
"src", | ||
"dist" | ||
], | ||
"license": "Apache-2.0", | ||
"author": "The Chromium Authors", | ||
@@ -30,2 +16,8 @@ "contributors": [ | ||
], | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/danielroe/beasties", | ||
"directory": "packages/beasties" | ||
}, | ||
"keywords": [ | ||
@@ -39,25 +31,36 @@ "critical css", | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/danielroe/beasties", | ||
"directory": "packages/beasties" | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.mjs" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "microbundle --target node --no-sourcemap -f cjs,esm", | ||
"docs": "documentation readme -q --no-markdown-toc -a public -s Usage --sort-order alpha src", | ||
"prepare": "npm run -s build" | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": { | ||
"chalk": "^4.1.0", | ||
"css-select": "^5.1.0", | ||
"css-what": "^6.1.0", | ||
"dom-serializer": "^2.0.0", | ||
"domhandler": "^5.0.2", | ||
"htmlparser2": "^8.0.2", | ||
"postcss": "^8.4.23", | ||
"domhandler": "^5.0.3", | ||
"htmlparser2": "^9.0.0", | ||
"picocolors": "^1.1.1", | ||
"postcss": "^8.4.47", | ||
"postcss-media-query-parser": "^0.2.3" | ||
}, | ||
"devDependencies": { | ||
"documentation": "^13.0.2", | ||
"microbundle": "^0.12.3" | ||
"@types/postcss-media-query-parser": "0.2.4", | ||
"documentation": "14.0.3", | ||
"unbuild": "2.0.0" | ||
}, | ||
"scripts": { | ||
"build": "unbuild && cp src/index.d.ts dist/index.d.ts", | ||
"build:stub": "unbuild --stub && cp src/index.d.ts dist/index.d.ts", | ||
"docs": "documentation readme src -q --no-markdown-toc -a public -s Usage --sort-order alpha" | ||
} | ||
} | ||
} |
@@ -39,7 +39,7 @@ <p align="center"> | ||
```js | ||
import Beasties from 'beasties'; | ||
import Beasties from 'beasties' | ||
const beasties = new Beasties({ | ||
// optional configuration (see below) | ||
}); | ||
}) | ||
@@ -52,7 +52,7 @@ const html = ` | ||
<div class="blue">I'm Blue</div> | ||
`; | ||
` | ||
const inlined = await beasties.process(html); | ||
const inlined = await beasties.process(html) | ||
console.log(inlined); | ||
console.log(inlined) | ||
// "<style>.blue{color:blue}</style><div class=\"blue\">I'm Blue</div>" | ||
@@ -59,0 +59,0 @@ ``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
0
88575
8
3
8
1893
+ Addedcss-what@^6.1.0
+ Addedpicocolors@^1.1.1
+ Addedhtmlparser2@9.1.0(transitive)
- Removedchalk@^4.1.0
- Removedansi-styles@4.3.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhtmlparser2@8.0.2(transitive)
- Removedsupports-color@7.2.0(transitive)
Updateddomhandler@^5.0.3
Updatedhtmlparser2@^9.0.0
Updatedpostcss@^8.4.47