mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 15:17:53 -05:00
Allow building only a single view
This commit is contained in:
parent
18ddbbfd18
commit
d0e83afcb9
2 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@ var webpack = require('webpack');
|
|||
var compiler = webpack(require('../webpack.config.js'));
|
||||
var handler = require('./handler');
|
||||
var log = require('./log');
|
||||
var routes = require('../src/routes.json').concat(require('../src/routes-dev.json'));
|
||||
var routes = require('../src/routes.json').concat(require('../src/routes-dev.json')).filter(route => !process.env.VIEW || process.env.VIEW === route.view);
|
||||
|
||||
// Create server
|
||||
var app = express();
|
||||
|
|
|
@ -13,6 +13,8 @@ if (process.env.NODE_ENV !== 'production') {
|
|||
routes = routes.concat(require('./src/routes-dev.json')); // eslint-disable-line global-require
|
||||
}
|
||||
|
||||
routes = routes.filter(route => !process.env.VIEW || process.env.VIEW === route.view);
|
||||
|
||||
let VersionPlugin = function (options) {
|
||||
this.options = options || {};
|
||||
return this;
|
||||
|
|
Loading…
Reference in a new issue