wearethoughtfox / amnesty-facebook

0 stars 0 forks source link

Put templates in scripts tags in index.html and copy using a UNIX command #8

Closed robertocarroll closed 7 years ago

robertocarroll commented 7 years ago

In an effort to keep away from grunt, web pack, browserify, etc. I wondered about putting the templates in script tags in index.html

sed -n "/<-- Templates-- >/,/<-- Templates-- >/p" app/index.html > docs/index.html

And then trigger that script in package.json

Would something that work?

paulwaitehomeoffice commented 7 years ago

I’m not very good with sed — what does that script do?

robertocarroll commented 7 years ago

I had you down as a UNIX expert! Going to put this on hold for the prototype and just copy and paste.

pauldwaite commented 7 years ago

Oh lord, no I actually write my npm scripts in JavaScript rather than bash or whatever, because at least there’s only one set of documentation (i.e. Node’s) to look at.