View Full Version : Importing files to my project?

22 Oct 2013, 7:59 AM
I have a controller .js file from someone else's project that I want to use in mine, how would I go importing it into my project? I'm aware of the export to file method and then I can just import component, but what if all I have is the .js file? is there any way to import it?

22 Oct 2013, 10:38 AM
anyone know?

23 Oct 2013, 6:35 AM
You can link it as a JS resource (this will only treat it as a plain text file and you will not get any of the niceties of SA).

23 Oct 2013, 6:40 AM
I see, so that means i can't do things with it like link it to a view, add controller actions, and such? Is there a way to "copy" it's code onto a controller in my project, or do I have to create a new one from scratch basically?

23 Oct 2013, 10:46 AM
There is no "import" from raw JS to Architect object. Right now you'd have to recreate it.