07Feb

Personal Project notes for the first week of February

Posted by Elf Sternberg as Uncategorized

It’s been awhile since I worked on a personal project.   I have an idea for a simple to-do list, just like everyone else’s.  But mine will be better!  I promise!  It will!  Or, at least, it’ll be mine.  Basically what it comes down to is that I hate every to-do list.  There are a few that are wonderful, but they’re not portable.  There are a few that are portable, but none of them are wonderful.

After a few preliminary sketches, stealing from all the best, I created a new directory and installed grunt, gruntc (a bash front-end to grunt that will look for a grunt.coffee file first, and use it instead of grunt.js; it uses a shadow .grunt.js file).  I’ve created a package.json file and a banner file (used by Grunt), called Omnipotence.  I’ve also created src and app directories, and installed Twitter Bootstrap as a vendor file. As I’m putting this project together, from the beginning, I start to feel a little overwhelmed.  Now, instead of require.js, there’s this thing called “components” that TJ has put out.  It’s designed to replace all of the ad-hoc construction we do with Javascript and make it systematic, but I barely know where to start.

I kinda want to use bacon.js in my project, but I wouldn’t know where to start. I loathe grunt.js’s opacity.   But Brunch’s tersness hurts just as hard.  Makefiles were fairly explicit, but they don’t handle the recursive issue of a standard build project.   Grunt-HAML is just broken; it doesn’t seem to work with Grunt 0.3 at all, and with Grunt 0.4 it mangles and underscore code you may have wanted to deploy client-side.

Still, something resembling progress is being made.

3 Responses to Personal Project notes for the first week of February

Mike A.

February 9th, 2013 at 6:12 pm

If it isn’t too long, could you post a sample of your Makefile?

My JavaScript experience doesn’t lend itself to envisioning a build chain that would require its own Makefile.

Thanks!

Elf Sternberg

February 11th, 2013 at 1:17 pm

This is just the start. It’s not terribly exciting, but it does the job. It looks like “post code” in comments strips out whitespace; try to remember that after every target rule the recipe has to be indented by a tab.

app_sources = src/app.coffee
app_objects = app/app.js

home_sources = src/index.haml
home_objects = app/index.html

default: build

build: app bootstrap $(app_objects) $(home_objects)

app:
mkdir -p $@

$(app_objects): app/%.js: src/%.coffee
coffee -o $(@D) -c $< $(home_objects): app/%.html: src/%.haml
haml --unix-newlines --no-escape-attrs --double-quote-attributes $< > $@

bootstrap: app
cp bootstrap-extras/variables.less vendor/bootstrap/less
cd vendor/bootstrap && make build
cd vendor/bootstrap/bootstrap && tar cf - .| (cd ../../../app && tar xvf - )

clean:
rm -fr app
cd vendor/bootstrap && git reset --hard HEAD

Mike A.

February 16th, 2013 at 10:37 am

Thanks!

If you were going to create an alternative to grunt and Brunch, which features would you borrow from each, and which would you avoid?

Comment Form

Subscribe to Feed

Categories

Calendar

February 2013
M T W T F S S
« Jan   Mar »
 123
45678910
11121314151617
18192021222324
25262728