react app

This commit is contained in:
Mario Romano
2016-04-06 17:52:19 +01:00
parent f7e6ef55a2
commit 29df96a085
4425 changed files with 446323 additions and 0 deletions

38
react-app/node_modules/envify/custom.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
var through = require('through')
, jstransform = require('jstransform')
, createVisitors = require('./visitors')
var processEnvPattern = /\bprocess\.env\b/
module.exports = function(rootEnv) {
rootEnv = rootEnv || process.env || {}
return function envify(file, argv) {
if (/\.json$/.test(file)) return through()
var buffer = []
argv = argv || {}
return through(write, flush)
function write(data) {
buffer.push(data)
}
function flush() {
var source = buffer.join('')
if (processEnvPattern.test(source)) {
try {
var visitors = createVisitors([argv, rootEnv])
source = jstransform.transform(visitors, source).code
} catch(err) {
return this.emit('error', err)
}
}
this.queue(source)
this.queue(null)
}
}
}