Gathering detailed insights and metrics for posthtml-load-plugins
Gathering detailed insights and metrics for posthtml-load-plugins
Gathering detailed insights and metrics for posthtml-load-plugins
Gathering detailed insights and metrics for posthtml-load-plugins
npm install posthtml-load-plugins
Typescript
Module System
Min. Node Version
Node Version
NPM Version
45.6
Supply Chain
85.1
Quality
80.5
Maintenance
100
Vulnerability
100
License
JavaScript (90.26%)
HTML (9.74%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
121 Commits
3 Watchers
2 Branches
10 Contributors
Updated on Jan 21, 2017
Latest Version
0.11.8
Package Id
posthtml-load-plugins@0.11.8
Size
4.01 kB
NPM Version
3.6.0
Node Version
6.2.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
25
1(sudo) npm i -D posthtml-load-plugins
Plugins will be loaded directly from your projects package.json file or local installed plugins.
Install them as usual with npm i -S
or npm i -D
or npm i
.
After installing your plugins there a three ways to declare your plugin options.
.js
or .json
.
For an example of well formed options file see below.1{ 2 "dependencies": { 3 "posthtml-bem": "^0.2.2", 4 "posthtml-each": "^1.0.1", 5 "posthtml-include": "^1.0.2" 6}, 7 "devDependencies": { 8 "posthtml-style-to-file": "^0.1.1" 9}, 10 "posthtml": { 11 "bem": { 12 "elemPrefix": "__", 13 "modPrefix": "-", 14 "modDlmtr": "--" 15 }, 16 "include": { 17 "root": "./", 18 "encoding": "utf-8" 19 }, 20 "styleToFile": { 21 "path": "./dist/style.css" 22 } 23 } 24}
```js
module.exports = {
bem: {
elemPrefix: '__',
modPrefix: '-',
modDlmtr: '--'
},
include: {
root: './',
encoding: 'utf-8'
},
styleToFile: {
path: './dist/style.css'
}
}
or
1module.exports = [ 2 { 3 bem: { 4 elemPrefix: '__', 5 modPrefix: '-', 6 modDlmtr: '--' 7 }, 8 include: { 9 root: './', 10 encoding: 'utf-8' 11 } 12 }, { 13 styleToFile: { 14 path: './dist/style.css' 15 } 16 } 17]
1{ 2 "bem": { 3 "elemPrefix": "__", 4 "modPrefix": "-", 5 "modDlmtr": "--" 6 }, 7 "include": { 8 "root": "./", 9 "encoding": "utf-8" 10 }, 11 "styleToFile": { 12 "path": "./dist/style.css" 13 } 14}
For general usage and build process integration see PostHTML Docs
1const fs = require('fs'); 2 3const posthtml = require('posthtml'); 4const plugins = require('posthtml-load-plugins'); 5 6let html = fs.readFileSync('./index.html', 'utf8'); 7 8posthtml(plugins([object|array[objects]|file] /* options */, [object|array[objects]|file] /* extends */)) 9 .process(html) 10 .then(result => console.log(result.html));
1const fs = require('fs'); 2 3const posthtml = require('posthtml'); 4const plugins = require('posthtml-load-plugins')('posthtml.(js|json)'); 5 6let html = fs.readFileSync('./index.html', 'utf8'); 7 8posthtml(plugins) 9 .process(html) 10 .then(result => console.log(result.html));
1const fs = require('fs'); 2 3const posthtml = require('posthtml'); 4const plugins = require('posthtml-load-plugins')('posthtml.(js|json)', {"posthtml-bem": {elemPrefix: '__'}}); 5 6let html = fs.readFileSync('./index.html', 'utf8'); 7 8posthtml(plugins) 9 .process(html) 10 .then(result => console.log(result.html));
1const fs = require('fs'); 2 3const posthtml = require('posthtml'); 4const standardConfig = require('posthtml-standard-config'); 5const plugins = require('posthtml-load-plugins')(standardConfig); 6 7let html = fs.readFileSync('./index.html', 'utf8'); 8 9posthtml(plugins) 10 .process(html) 11 .then(result => console.log(result.html));
Ivan Demidov |
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More