antwarjs / antwar

A static site generator built with React and Webpack.
https://antwar.js.org/
MIT License
460 stars 35 forks source link

Coffeescript dependency missing #37

Closed eldh closed 9 years ago

eldh commented 9 years ago

Had a friend try the installation process and it complained about coffeescript dependency. Should be investigated further. Possibly the default-theme should have an explicit dep.

bebraw commented 9 years ago

Yeah. That's where the dependency comes from. Otherwise we're caffeine free.

winkler1 commented 9 years ago

getting this too...

$ antwar --develop
Starting development build

/Users/Jeff/repos/rrocks_blog/.antwar/build/bundleStaticPage.js:21766
\"elements/PathsMixin.coffee\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
                                                                     ^
Error: Cannot find module "elements/PathsMixin.coffee"
  at webpackMissingModule (/Users/Jeff/repos/rrocks_blog/.antwar/build/bundleStaticPage.js:21766:79)
  at Object.<anonymous> (/Users/Jeff/repos/rrocks_blog/.antwar/build/bundleStaticPage.js:21766:182)
eldh commented 9 years ago

I'll look into that tonight. Hopefully just pushing new versions should do the trick.

bebraw commented 9 years ago

@eldh Just pushed new versions. Theme was still depending on the old CoffeeScript bits.

@winkler1 Can you try to generate a new project using antwar --init? It should get a newer boilerplate now. No need to update cli.

winkler1 commented 9 years ago

meh... jsx/webpack loader config.

ERROR in /usr/local/lib/~/antwar-cli/~/antwar/elements/Routes.jsx
Module parse failed: /usr/local/lib/node_modules/antwar-cli/node_modules/antwar/elements/Routes.jsx Line 18: Unexpected token <
You may need an appropriate loader to handle this file type.
| 
| 
| module.exports = <Route name='home' title='Home' handler={Layout}>
|   <Route name='/antwar_devindex' handler={DevIndex}></Route>
|   <Route name='/blog' path='/blog/?' handler={Blog}></Route>
 @ /usr/local/lib/~/antwar-cli/~/antwar/build/dev_entry.js 4:13-46
bebraw commented 9 years ago

Just pushed out a version with extensions related fix. HMR still seems broken on my system. Gotta study that on better time. It's alpha level still so issues are expected.

winkler1 commented 9 years ago

Still getting errors-

INSTALLED VERSION
/usr/local/lib
└─┬ antwar-cli@0.5.1
  └── antwar@0.3.1 

Could you please do some smoke testing that things work on other machines? Here's a quick script to automate it:

npm install antwar-cli -g

rm -rf antwar_test_blog
antwar --init antwar_test_blog
cd antwar_test_blog

echo 'INSTALLED VERSION'
npm list -g antwar
antwar --develop
eldh commented 9 years ago

There I was, thinking I was smart.

eldh commented 9 years ago

Try it now. :) works for me after fixes made in antwar 0.3.3

winkler1 commented 9 years ago

Server comes up now, with script shown above. But getting this NODE_ENV undefined--

http://screencast.com/t/GGImcgHN1l

eldh commented 9 years ago

that's interesting. I can reproduce, so let's see if I can find a fix.

winkler1 commented 9 years ago

OK, it's working now with proper styling. Woohooh! HMR is working too. Sweet!

If you don't mind me continuing this issue... I notice there's CoffeeScript in pages/index.coffee and Page.coffee. Not a fan of CS myself.. much prefer JSX syntax. IMO adoption would be better without Coffeescript.

eldh commented 9 years ago

Awesome!

We got rid of CS in antwar core. Now it's only present in the default theme. minimal-theme is a jsx-only theme from which it's easy to start making new themes. I'd love to see more themes and we might switch default theme in the future, but there are no plans to switch the current default-theme to jsx.

eldh commented 9 years ago

We're also planning to make it possible to have site-specific themes. Gonna do that soon actually. :)

eldh commented 9 years ago

Oh, time to close this also :)