Gathering detailed insights and metrics for rollup-plugin-re
Gathering detailed insights and metrics for rollup-plugin-re
Gathering detailed insights and metrics for rollup-plugin-re
Gathering detailed insights and metrics for rollup-plugin-re
npm install rollup-plugin-re
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
35 Stars
21 Commits
8 Forks
2 Watchers
1 Branches
3 Contributors
Updated on Oct 09, 2022
Latest Version
1.0.7
Package Id
rollup-plugin-re@1.0.7
Unpacked Size
27.49 kB
Size
5.82 kB
File Count
9
NPM Version
4.1.2
Node Version
7.6.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
2
6
Power rollup content transform plugin.
npm install --save-dev rollup-plugin-re
1import { rollup } from 'rollup' 2import replace from 'rollup-plugin-re' 3import commonjs from 'rollup-plugin-commonjs' 4rollup({ 5 entry: 'main.js', 6 plugins: [ 7 replace({ 8 // ... do replace before commonjs 9 patterns: [ 10 { 11 // regexp match with resolved path 12 match: /formidable(\/|\\)lib/, 13 // string or regexp 14 test: 'if (global.GENTLY) require = GENTLY.hijack(require);', 15 // string or function to replaced with 16 replace: '', 17 } 18 ] 19 }), 20 commonjs(), 21 replace({ 22 // ... do replace after commonjs 23 }) 24 ] 25}).then(...)
use defines
options to remove macro blocks
1{ 2 defines: { 3 IS_SKIP: false, 4 IS_REMOVE: true, 5 } 6}
1// #if IS_SKIP 2 console.log('!Skip!') 3// #endif 4// #if IS_REMOVE 5console.log('!Remove!') 6// #endif
1// #if IS_SKIP 2 console.log('!Skip!') 3// #endif
use replaces
options to quick replace text
1{ 2 replaces: { 3 $version: "1.0.1" 4 } 5}
1 console.log('$version')
1 console.log('1.0.1')
1{ 2 // a minimatch pattern, or array of patterns, of files that 3 // should be processed by this plugin (if omitted, all files 4 // are included by default)... 5 include: 'config.js', 6 7 // ...and those that shouldn't, if `include` is otherwise 8 // too permissive 9 exclude: 'node_modules/**', 10 defines: { 11 IS_SKIP: false, 12 IS_REMOVE: true, 13 }, 14 replaces: { 15 $version: "1.0.1" 16 }, 17 patterns: [ 18 { 19 include: [], // same as above 20 exclude: [], // same as above 21 // regexp match with resolved path 22 match: /formidable(\/|\\)lib/, 23 // string or regexp 24 test: 'if (global.GENTLY) require = GENTLY.hijack(require);', 25 // string or function 26 replace: '', 27 }, 28 // replace whole file content 29 { 30 text: 'exports = "content"', // replace content with given text 31 }, 32 { 33 file: './replace.js', // replace with given relative file 34 }, 35 { 36 transform (code, id) { // replace by function 37 return `'use strict';\n${code}` 38 } 39 } 40 ] 41}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/17 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
branch protection not enabled on development/release branches
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