![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
gulp-token-replace
Advanced tools
A token replace plugin for gulp 3
First, install gulp-token-replace
as a development dependency:
npm install --save-dev gulp-token-replace
Add it to your gulpfile.js
:
var replace = require('gulp-token-replace');
gulp.task('token-replace', function(){
var config = require('./configuration/config.json');
return gulp.src(['src/*.js', 'src/*.html'])
.pipe(replace({global:config}))
.pipe(gulp.dest('dist/'))
});
module.exports = {
"tokens":{
"RMLibs":"http://ads.pictela.com/ads/jsapi/ADTECH.js",
"size":"320x50",
"Copyrights":"Copyright 2010-2014 AOL Platforms.",
"Author":"Martin Wojtala"
},
"main":{
"name":"example",
"title":"EXAMPLE TITLE"
}
};
In a file (also works for JavaScript)
<!--{{tokens.Copyrights}}-->
<!--canvasSize:{{tokens.size}}-->
<!DOCTYPE html>
<html lang="en">
<head><title>{{main.title}}</title>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta charset="UTF-8">
<script src="{{tokens.RMLibs}}"></script>
<script src="swipe.min.js"></script>
<link rel="stylesheet" href="{{main.name}}.css">
<script src="{{main.name}}.debug.js"></script>
</head>
<body>
<div id="content"></div>
<div id="debug"></div>
</body>
</html>
gulp-token-replace can be called with a config object with these attributes:
{{main.css}}
or {{styles/main.css}}
can be used.Type: Object
configuration object.
Note: gulp-token-replace cannot perform regex replacement on streams.
FAQs
A token replace plugin for gulp
We found that gulp-token-replace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.