 sourcemaps = require 'gulp-sourcemaps'
 uglify = require 'gulp-uglify'
 watch = require 'gulp-watch'
+React = require 'react'
+{AppView} = require './src/scripts/views/app-view'
 
 buildBody = (props) ->
   React.DOM.body(

    )
  )

buildHtml = (title, props) ->
  React.DOM.html(
    null
    buildHead(title, props)
    buildBody(props)
  )

buildTitle = (entry) ->
  titlePrefix = if entry?
    date = moment(entry.pubdate).format 'YYYY-MM-DD'
    date + ' ' + entry.title + ' - '
  else
    ''
  titlePrefix + 'blog.bouzuya.net'

loadEntries = (src) ->
  myjekyll = require 'myjekyll'

  ServerReactRootIndex = require 'react/lib/ServerReactRootIndex'
  ServerReactRootIndex.createReactRootIndex = ->
    0
  props =
    entries: [entry].filter (i) -> i
    entry: entry
    hasNext: false
    searchText: null # entry?.date ? null
    searchVisible: false # entry?
  fse.outputFileSync file, buildHtmlAsString(props)

ignoreError = (stream) ->
  stream.on 'error', (e) ->
