From f8361beee33d8678f9d48dd1fb2f15372ebdc3ba Mon Sep 17 00:00:00 2001 From: mandado Date: Thu, 11 Apr 2019 15:59:59 -0300 Subject: [PATCH] added support to open with design_theme_id --- bin/config.js | 6 ++++++ bin/tasks/serve.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/config.js b/bin/config.js index bdf7474..b1d7b6f 100644 --- a/bin/config.js +++ b/bin/config.js @@ -204,6 +204,12 @@ exports.getSchoolId = (env) => { return exports.theme[env].school_id; }; +exports.getThemeId = (env) => { + env = env || 'production'; + + return exports.theme[env].theme_id; +}; + exports.wiredep = { exclude: [ /\/bootstrap-sass\/.*\.js/ diff --git a/bin/tasks/serve.js b/bin/tasks/serve.js index 423a1cd..45d55f8 100644 --- a/bin/tasks/serve.js +++ b/bin/tasks/serve.js @@ -11,7 +11,7 @@ let sync = require('../service'); gulp.task('serve', ['build'], () => { let bsConfig = config.browser_sync; - bsConfig.proxy = config.theme[config.env].url; + bsConfig.proxy = `${config.theme[config.env].url}?design_theme_id=${config.getThemeId(config.env)}`; browserSync.init(bsConfig); gulp.watch(config.paths.scss + '**/*.scss', {cwd: './'}, ['scss'])