diff --git a/.gitignore b/.gitignore index 30d8e6c..01f5a19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ node_modules/ +/app/config.* +!/app/config.example.js /server/config.* !/server/config.example.js /server/public/ diff --git a/app/config.example.js b/app/config.example.js new file mode 100644 index 0000000..7734362 --- /dev/null +++ b/app/config.example.js @@ -0,0 +1,4 @@ +module.exports = +{ + chromeExtension : 'https://chrome.google.com/webstore/detail/fckajcjdaabdgnbdcmhhebdglogjfodi' +}; diff --git a/app/gulpfile.js b/app/gulpfile.js index 6f06c06..3eaa076 100644 --- a/app/gulpfile.js +++ b/app/gulpfile.js @@ -20,6 +20,7 @@ const gulpif = require('gulp-if'); const gutil = require('gulp-util'); const plumber = require('gulp-plumber'); const rename = require('gulp-rename'); +const change = require('gulp-change'); const header = require('gulp-header'); const touch = require('gulp-touch-cmd'); const browserify = require('browserify'); @@ -45,6 +46,7 @@ const BANNER_OPTIONS = currentYear : (new Date()).getFullYear() }; const OUTPUT_DIR = '../server/public'; +const appOptions = require('./config'); // Set Node 'development' environment (unless externally set). process.env.NODE_ENV = process.env.NODE_ENV || 'development'; @@ -123,6 +125,11 @@ function bundle(options) return rebundle(); } +function changeHTML(content) +{ + return content.replace(/chromeExtension/g, appOptions.chromeExtension); +} + gulp.task('clean', () => del(OUTPUT_DIR, { force: true })); gulp.task('lint', () => @@ -163,6 +170,7 @@ gulp.task('css', () => gulp.task('html', () => { return gulp.src('index.html') + .pipe(change(changeHTML)) .pipe(gulp.dest(OUTPUT_DIR)); }); diff --git a/app/index.html b/app/index.html index 6f4ba8a..ea79bc7 100644 --- a/app/index.html +++ b/app/index.html @@ -8,6 +8,7 @@ +