mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add envify
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/// <reference path="envify.d.ts" />
|
||||
/// <reference path="../browserify/browserify.d.ts" />
|
||||
|
||||
import browserify = require('browserify')
|
||||
import envify = require('envify/custom');
|
||||
import fs = require('fs');
|
||||
|
||||
|
||||
var b = browserify('main.js')
|
||||
, output = fs.createWriteStream('bundle.js');
|
||||
|
||||
b.transform(envify({
|
||||
NODE_ENV: 'development'
|
||||
}));
|
||||
b.bundle().pipe(output);
|
||||
|
||||
b.transform(envify({
|
||||
_: 'purge'
|
||||
, NODE_ENV: 'development'
|
||||
}));
|
||||
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for envify
|
||||
// Project: https://github.com/hughsk/envify
|
||||
// Definitions by: Qubo <https://github.com/tkQubo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "envify" {
|
||||
var envify: Function;
|
||||
export = envify;
|
||||
}
|
||||
|
||||
declare module "envify/custom" {
|
||||
function envify(environment: { [name: string]: any }): Function;
|
||||
export = envify;
|
||||
}
|
||||
Reference in New Issue
Block a user