Skip to content
Snippets Groups Projects
Commit 080e8d15 authored by Ken Hawkins's avatar Ken Hawkins
Browse files

fix: make fractal.js more configurable

Allows passin of theme, build, and browser open options.

Will need to move all these options into a proper config setting in a new PR.
parent 77d48b05
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ module.exports = {
// // global-name: global-val
// },
extensions: {
codeblock: require('./tools/vf-frctl-extensions/codeblock.js')(fractal)
codeblock: require(__dirname + '/tools/vf-frctl-extensions/codeblock.js')(fractal)
}
});
......@@ -65,15 +65,18 @@ module.exports = {
fractal.web.set('builder.dest', vfBuilderPath);
/* configure web */
fractal.web.set('static.path', __dirname + '/public');
var vfStaticPath = global.vfStaticPath || __dirname + '/public';
fractal.web.set('static.path', vfStaticPath);
fractal.web.set('server.sync', true);
var vfOpenBrowswer = global.vfOpenBrowswer || true;
fractal.web.set('server.syncOptions', {
open: true,
open: vfOpenBrowswer,
browser: 'default',
sync: true
});
const vfTheme = require('./tools/vf-frctl-theme');
var vfThemePath = global.vfThemePath || '@frctl/mandelbrot';
const vfTheme = require(vfThemePath);
const vfThemeConfig = vfTheme({}, fractal);
fractal.components.set('statuses', {
......
......@@ -13,6 +13,7 @@ const config = JSON.parse(fs.readFileSync('./package.json'));
global.vfName = config.vfConfig.vfName;
global.vfNamespace = config.vfConfig.vfNamespace;
global.vfComponentPath = __dirname + '/components';
global.vfThemePath = './tools/vf-frctl-theme';
// -----------------------------------------------------------------------------
// Dependencies
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment