mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 07:08:02 -05:00
Hide components route in production
This commit is contained in:
parent
448bb8aa3f
commit
a0a30155af
3 changed files with 13 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');
|
||||
var routes = require('../src/routes.json').concat(require('../src/routes-dev.json'));
|
||||
|
||||
// Create server
|
||||
var app = express();
|
||||
|
|
8
src/routes-dev.json
Normal file
8
src/routes-dev.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"name": "components",
|
||||
"pattern": "^/components/?$",
|
||||
"view": "components/components",
|
||||
"title": "Components"
|
||||
}
|
||||
]
|
|
@ -7,6 +7,10 @@ var webpack = require('webpack');
|
|||
|
||||
var routes = require('./src/routes.json');
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
routes = routes.concat(require('./src/routes-dev.json'));
|
||||
}
|
||||
|
||||
var VersionPlugin = function (options) {
|
||||
this.options = options || {};
|
||||
return this;
|
||||
|
|
Loading…
Reference in a new issue