These are chat archives for ractivejs/ractive
rvcalso did something similar (converted component files into AMD modules with pre-parsed, embedded templates). I remember doing this stuff with grunt, grunt-contrib-requirejs and a grunt-rev. You can probably take inspiration from this.
rcuhas APIs to parse through a component file.
rcu-buildershas APIs to emit various module formats.