Installations
npm install grunt-envify
Developer Guide
Typescript
No
Module System
N/A
Min. Node Version
>= 0.8.0
Node Version
5.6.0
NPM Version
3.6.0
Contributors
Unable to fetch Contributors
Languages
JavaScript (57.01%)
CoffeeScript (42.99%)
Developer
couchand
Download Statistics
Total Downloads
23,471
Last Day
2
Last Week
6
Last Month
32
Last Year
544
GitHub Statistics
2 Stars
16 Commits
2 Forks
3 Watching
1 Branches
2 Contributors
Package Meta Information
Latest Version
0.1.0
Package Id
grunt-envify@0.1.0
Size
3.72 kB
NPM Version
3.6.0
Node Version
5.6.0
Total Downloads
Cumulative downloads
Total Downloads
23,471
Last day
0%
2
Compared to previous day
Last week
100%
6
Compared to previous week
Last month
77.8%
32
Compared to previous month
Last year
13.6%
544
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
4
grunt-envify
Grunt plugin for envify without browserify.
This might not be what you're looking for. If you want to set the variables in process.env, you're looking for grunt-env. If you want to use envify as part of browserify, you want grunt-browserify. This module is only useful if you'd like envify but without the browserify.
Getting Started
This plugin requires Grunt >=0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
1npm install grunt-envify --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
1grunt.loadNpmTasks('grunt-envify');
The "envify" task
Overview
In your project's Gruntfile, add a section named envify
to the data object passed into grunt.initConfig()
.
1grunt.initConfig({
2 envify: {
3 options: {
4 env: {
5 // Pass custom env to use instead of process.env.
6 }
7 },
8 your_target: {
9 // Target-specific file lists and/or env sandbox go here.
10 }
11 }
12});
Options
options.env
Type: Object
Default value: process.env
An object of env variables to use instead of process.env.
Usage Examples
Default
In this example, process.env is used.
1grunt.initConfig({ 2 envify: { 3 your_target: { 4 files: { 5 'dest/index.js': ['src/index.js'] 6 } 7 } 8 } 9});
Custom Env
Override process.env with custom variables.
1grunt.initConfig({ 2 envify: { 3 your_target: { 4 options: { 5 env: { 6 NODE_ENV: 'production' 7 } 8 }, 9 files: { 10 'dest/index.js': ['src/index.js'] 11 } 12 } 13 } 14});
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Thanks to the following contributors:
- @CarlRosell
- @stefanodacchille
Release History
- v0.0.3 - 14 January 2016
- v0.0.2 - 18 July 2014
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE-MIT:0
- Info: FSF or OSI recognized license: MIT License: LICENSE-MIT:0
Reason
Found 1/16 approved changesets -- score normalized to 0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Score
3
/10
Last Scanned on 2024-12-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