gulp-env-loader
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -34,3 +34,12 @@ const through = require('through2') | ||
module.exports = function (config = {}) { | ||
/** | ||
* generate a function to inject environment variables into files | ||
* | ||
* @param {object | string} [config={}] - The configuration object. | ||
* @param {string} [config.mode] - The mode. | ||
* @param {string} [config.modeKey] - The mode-key. | ||
* @param {string} [config.path] - The .env file path. | ||
* @return {function} The envInject function. | ||
*/ | ||
module.exports = function envLoader (config = {}) { | ||
const conf = { | ||
@@ -48,2 +57,9 @@ mode: argv.mode | ||
/** | ||
* Inject environment variables into file contents. | ||
* | ||
* @param {Object} options - The options for the transform stream (default: {}). | ||
* @param {boolean} options.isVar - A flag indicating whether to replace variables in the file contents (default: true). | ||
* @return {Stream} - The transform stream. | ||
*/ | ||
function envInject(options = {}) { | ||
@@ -50,0 +66,0 @@ return through.obj((file, enc, callback) => { |
{ | ||
"name": "gulp-env-loader", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A gulp plugin for loading environment variables and replacing them in the contents of files.", | ||
@@ -8,4 +8,3 @@ "main": "./libs/index.js", | ||
"files": [ | ||
"libs", | ||
"types" | ||
"libs" | ||
], | ||
@@ -40,2 +39,3 @@ "scripts": { | ||
"dependencies": { | ||
"@types/node": "*", | ||
"dotenv": "^16.0.3", | ||
@@ -48,5 +48,4 @@ "dotenv-expand": "^10.0.0", | ||
"devDependencies": { | ||
"@types/node": "^18.16.1", | ||
"gulp": "^4.0.2" | ||
} | ||
} |
12852
1
6
6
140
+ Added@types/node@*
+ Added@types/node@22.13.4(transitive)
+ Addedundici-types@6.20.0(transitive)