Skip to content

Commit

Permalink
Merge pull request #19 from SmaatoUI/BT-255/feature/envify
Browse files Browse the repository at this point in the history
[BT-255]: Added browserify transform envify
  • Loading branch information
jenslonkowski committed Jan 18, 2016
2 parents 7d755b2 + 8fcc123 commit 08ab452
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions demo/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ gulp.task('demoDeploy', gulpTasks.deploy({
src: `${DISTRIBUTION_DIR}/**/*.*`,
// Deploys to http://gulp-tasks-test.smaatolabs.net/
bucketName: 'smt-gulp-tasks-test',
accessKeyId: process.env.GULP_TASKS_AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.GULP_TASKS_AWS_SECRET_ACCESS_KEY,
accessKeyId: process.env.GULP_TASKS_AWS_ACCESS_KEY_ID || 'No ENV',
secretAccessKey: process.env.GULP_TASKS_AWS_SECRET_ACCESS_KEY || 'No ENV',
}).task);

/**
Expand Down
2 changes: 1 addition & 1 deletion demo/src/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

console.log('Hello, world!'); // eslint-disable-line no-console
console.log('Hello, world!', process.env.NODE_ENV); // eslint-disable-line no-console
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"browserify": "12.0.0",
"browserify-hmr": "0.3.1",
"browserify-istanbul": "0.2.1",
"envify": "3.4.0",
"eslint": "1.7.1",
"eslint-config-airbnb": "0.0.8",
"eslint-plugin-react": "3.6.2",
Expand Down
2 changes: 2 additions & 0 deletions src/compileJs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const browserify = require('browserify');
const browserifyHmr = require('browserify-hmr');
const cssWsConfigureClient = require('./cssWebsocket/configureClient');
const cssWsServer = require('./cssWebsocket/server');
const envify = require('envify');
const gulp = require('gulp');
const gulpUtil = require('gulp-util');
const vinylSourceStream = require('vinyl-source-stream');
Expand Down Expand Up @@ -60,6 +61,7 @@ module.exports = customConfig => {
bundler = watchify(bundler);
}
bundler.transform(babelify);
bundler.transform(envify);

if (config.watch) {
cssWsConfigureClient(config.cssReloadPort, config.cssReloadPath);
Expand Down

0 comments on commit 08ab452

Please sign in to comment.