Gathering detailed insights and metrics for gulp-preprocess
Gathering detailed insights and metrics for gulp-preprocess
Gathering detailed insights and metrics for gulp-preprocess
Gathering detailed insights and metrics for gulp-preprocess
gulp-autoprefixer
Prefix CSS
gulp-preprocess-file
A Gulp plugin for Preprocess files based off environment configuration. Based on Preprocess package
gulp-i18n-preprocess
Preprocess Polymer templates and extract UI strings to JSON for build-time I18N with i18n-behavior
gulp-strip-css-comments
Strip comments from CSS
Original https://registry.npmjs.org/gulp-preprocess/-/gulp-preprocess-2.0.0.tgz
npm install gulp-preprocess
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (91.98%)
HTML (6.36%)
CoffeeScript (1.66%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
20 Stars
43 Commits
4 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Feb 28, 2024
Latest Version
5.0.0
Package Id
gulp-preprocess@5.0.0
Unpacked Size
12.70 kB
Size
4.03 kB
File Count
17
NPM Version
10.4.0
Node Version
21.6.1
Published on
Feb 28, 2024
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
Gulp plugin to preprocess HTML, JavaScript, and other files based on custom context or environment configuration
Package | gulp-preprocess |
Node Version | >= 18 |
Gulp Version | >= 4 |
npm install gulp-preprocess --save-dev
1var preprocess = require("gulp-preprocess"); 2 3gulp.task("html", function () { 4 gulp 5 .src("./app/*.html") 6 .pipe(preprocess({ context: { NODE_ENV: "production", DEBUG: true } })) // To set environment variables in-line 7 .pipe(gulp.dest("./dist/")); 8}); 9 10gulp.task("scripts", function () { 11 gulp.src(["./app/*.js"]).pipe(preprocess()).pipe(gulp.dest("./dist/")); 12});
1<head> 2 <title>Your App</title> 3 4 <!-- @if NODE_ENV='production' --> 5 <script src="some/production/lib/like/analytics.js"></script> 6 <!-- @endif --> 7 8</head> 9<body> 10 <!-- @ifdef DEBUG --> 11 <h1>Debugging mode - <!-- @echo RELEASE_TAG --> </h1> 12 <!-- @endif --> 13 <p> 14 <!-- @include welcome_message.txt --> 15 </p> 16</body>
1var configValue = "/* @echo FOO */" || "default value"; 2 3// @ifdef DEBUG 4someDebuggingCall(); 5// @endif
CoffeeScript files are also supported.
gulp-preprocess
uses preprocess. More examples can be found in its README.
Type: Object
Default: {}
Context for directives used in your preprocessed files. The default context consists of the current user environment variables. Custom context is merged with process.env
.
Type: String
Base directory for included files. By default, the path to included files is relative to the file currently being processed.
Type: String
Override the file extension. This determines what regular expressions are used for comments. You may wish to do this if you are using a custom extension or need to force a particular comment syntax (for example, to allow HTML-style comments in .php
files).
The MIT License (MIT)
Copyright (c) 2014 Jason Sandmeyer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
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-06-30
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