Reputation: 964
I made an app in Rails
and AngularJS
. A startup approached me to port the technology over to their site, but they have very limited technology resources, so the idea is to make it very easy to integrate.
I want it to work a bit like Google Analytics
- they include one external javascript file and add a snippet of code with a reference id/code in it. Then the rest is handled on my side.
I haven’t done this before, especially not in AngularJS. I want to use AngularJS in a section of their site without them needing to install it.
Should I just put all the directives and services into a minified file or should I have a smarter setup?
I would appreciate it if anyone could point me in the right direction. I'm also looking for any recommended gems/tools that can help me with this. I’m happy to explain further if needed.
Update
I ended up using Brunch, this article was very helpful.
Upvotes: 0
Views: 52
Reputation: 16300
You could create a grunt build task that will inline your html templates as strings into your js, and then concatenate and minifying your code.
Upvotes: 1