Skip to content

Commit

Permalink
Allow loading jsx html template files
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Sep 11, 2015
1 parent cc3cf2a commit 563604d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/loaders/config-loader/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = (source) ->
value.relativePath = path.relative('.', directory)

# Load pages.
globPages directory, (err, pagesData) ->
globPages directory, (err, pagesData) =>
value.pages = pagesData
@value = [value]
callback null, 'module.exports = ' + JSON.stringify(value, undefined, "\t")
12 changes: 7 additions & 5 deletions lib/loaders/config-loader/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/utils/serve.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require('node-cjsx').transform()
require("babel/register")
Hapi = require 'hapi'
Boom = require 'boom'
React = require 'react'
Expand All @@ -20,7 +21,7 @@ module.exports = (program) ->
try
HTML = require directory + '/html'
catch e
console.log e
console.log "error loading html template", e
HTML = require "#{__dirname}/../isomorphic/html"

# Generate random port for webpack to listen on.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"async": "^1.2.1",
"babel": "^5.8.23",
"babel-core": "^5.5.8",
"babel-loader": "^5.1.4",
"boom": "^2.7.2",
Expand Down

0 comments on commit 563604d

Please sign in to comment.