Recent Posts

Recent Comments

Archives

Categories

Meta

It’s now been almost a year since Google published their Web Starter Kit and I decided to give it a spin. Good of them to provide such a template, but the documentation is light. I love much of what Google does, but documenters they aren’t, I suppose they expect the Web to be self-documenting.

The other problem is that I’m using it with IntelliJ which nicely (IntelliJ does does everything well) includes it. However to use it you have to (or should) use it in a way that you normally don’t with IntellJ. Here’s how …

First create a project …

give it a name …

And you get the following project structure (as of this version) …

OK, bringing up install.md shows you need to make sure you have node.js and gulp, then finally do a npm install at a command line, in the root project directory

Now there’s a new folder with the npm installs

Now you’re ready to try it, type gulp serve at the command line

and you can see your initial page. Now here’s the cool part, as you make changes to the files the web page updates automatically, so you can see edits as they occur. Really neat … but some differences from working with straight IntelliJ

If you try from the built in IntelliJ Web Server (http://localhost:63342/TestWebStarterKit/app) then you get the following crud

Instead of

Not too nice, so use the gulp web server. Now, what about deployment? Now it gets murky as the documentation peters out. Looking in the gulpfile.js file we see just the following command for deployment

type gulp default at the command line creates a dist directory. Good, right? Just promote to your website and you’re off. Not quite, at least not for me. I found that I was getting an infinite loop of redirects … why? After much digging I found the following question in the setup for my website

Do you want the www in your URL?

only the final setting “Remove WWW: Make http://www.FOO.com/ redirect to http://FOO.com