Skip to content

Instantly share code, notes, and snippets.

View rwhitmire's full-sized avatar
👢
New boot goofin'

Ryan Whitmire rwhitmire

👢
New boot goofin'
View GitHub Profile
@rwhitmire
rwhitmire / !description.md
Last active August 29, 2015 14:14
grunt-sails-linker ideas

continuation from: https://gist.github.com/mikermcneil/f1294b34f89f9ee9f392

Problems I ran into

After spending a decent amount of time working on a new approach for bundling and automatically injecting references into the HTML, a few problems started presenting themselves. First of all, declaring glob patterns inline with a tag limits our flexibility. It makes it difficult (impossible?) to bundle files from multiple directories. It also becomes difficult (impossible?) to specify the order of scripts if needed.

Also, injecting files from pipeline.js becomes difficult as we don't really know where to put files if multiple blocks exist.

Potential solution

I spend a fair amount of time working in ASP.NET, and I think we can possibly borrow some of their ideas for bundling and injecting scripts onto the page. I think we could repurpose pipleine.js - possibly rename it bundles.js - to contain data about resource bundles. See code below for examples.

@rwhitmire
rwhitmire / loc.sh
Created June 13, 2013 13:23
counts lines of code
( find ./ -name '*.js' -print0 | xargs -0 cat ) | wc -l