Skip to content

Commit eaa2958

Browse files
committed
Update antwar + split root layouts
I rewrote the bootstrap script (going to need it for 404 checker work). Also split the root level layouts so it's easier to work with those.
1 parent 7b387c0 commit eaa2958

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

antwar.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ function root(contentCb) {
8888
},
8989
processPage: processPage(), // Process individual page (url, content)
9090
layouts: { // Layouts (page/section)
91-
page: function() {
91+
index: function() {
9292
return require('./components/splash/splash.jsx').default
93+
},
94+
page: function() {
95+
return require('./components/page/page.jsx').default
9396
}
9497
},
9598
redirects: {} // Redirects <from>: <to>

bootstrap.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const antwar = require('antwar');
2-
const webpack = require('./webpack.config');
3-
const configuration = require('./antwar.config');
2+
3+
const environment = process.env.npm_lifecycle_event;
44

55
// Patch Babel env to make HMR switch work
6-
process.env.BABEL_ENV = process.env.npm_lifecycle_event;
6+
process.env.BABEL_ENV = environment;
77

8-
antwar({
9-
configuration,
10-
environment: process.env.npm_lifecycle_event,
11-
webpack
8+
antwar[environment]({
9+
environment,
10+
antwar: require('./antwar.config'),
11+
webpack: require('./webpack.config')
1212
}).catch(function (err) {
1313
console.error(err);
1414
});

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
},
3737
"devDependencies": {
3838
"alex": "^3.1.0",
39-
"antwar": "0.8.1-alpha.fb334255",
40-
"antwar-helpers": "0.8.1-alpha.fb334255",
41-
"antwar-interactive": "0.8.1-alpha.fb334255",
42-
"antwar-prevnext-plugin": "0.8.1-alpha.fb334255",
39+
"antwar": "0.8.1-alpha.95152042",
40+
"antwar-helpers": "0.8.1-alpha.95152042",
41+
"antwar-interactive": "0.8.1-alpha.95152042",
42+
"antwar-prevnext-plugin": "0.8.1-alpha.95152042",
4343
"autoprefixer": "^6.3.7",
4444
"babel-core": "^6.10.4",
4545
"babel-eslint": "^6.1.2",

0 commit comments

Comments
 (0)