<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font face="Helvetica, arial, freesans, clean, sans-serif" size="4"><b>from this gist:</b></font><a href="https://gist.github.com/4485018">https://gist.github.com/4485018</a><div><br><h2 style="text-rendering: optimizelegibility; margin: 0px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); font-family: Helvetica, arial, freesans, clean, sans-serif; z-index: auto; ">Custom Aerogear.js Builder</h2><p style="margin: 0px 0px 15px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">Prototype here:&nbsp;<a href="http://aerogearjsbuilder-lholmqui.rhcloud.com/" style="color: rgb(65, 131, 196); text-decoration: initial;">http://aerogearjsbuilder-lholmqui.rhcloud.com/</a></p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">myrepo:&nbsp;<a href="mailto:git@github.com" style="color: rgb(65, 131, 196); text-decoration: initial;">git@github.com</a>:lholmquist/aerogearjsbuilder.git</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">There is still a couple of minor tweaks that i need, like better error handling and CORS support possible. although it uses an iframe, so maybe not</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">This is the way it works.</p><h3 style="text-rendering: optimizelegibility; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, freesans, clean, sans-serif; ">client side</h3><p style="margin: 0px 0px 15px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">once you submit, the code builds the query params, then sends it to the server( duh ) using an iframe( atm )</p><h3 style="text-rendering: optimizelegibility; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, freesans, clean, sans-serif; ">Server side</h3><p style="margin: 0px 0px 15px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">Server side is a node.js server running on option shift</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">There is a "base" grunt.js file that has "markers" for the src and destination, This gets read in, replacements are made and then saved( customhash.js ) to a temporary directory( date in millis ). Then a node child proccess, runs grunt using this new custom grunt file, while overiding the "base", where the src files are, and the "config", where the custom grunt file is</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">once grunt is finished creating the files, the server then zips them up and sends that back to the client.</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">and then deletes the temporary directory</p><h3 style="text-rendering: optimizelegibility; margin: 20px 0px 10px; padding: 0px; -webkit-font-smoothing: antialiased; cursor: text; position: relative; font-size: 18px; font-family: Helvetica, arial, freesans, clean, sans-serif; ">Src File Storage</h3><p style="margin: 0px 0px 15px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">The src files are currently stored in the OPENSHIFT_DATA_DIR, this is used for persistent storage and doesn't get recreated after every build.</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">Currently i need to ssh on to the server and do a git pull to update the repo in this directory.</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">Not really sure if there is a better way, perhaps a cron, or something.</p><p style="margin: 15px 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">Originally i had the src files in the project itself, but then moved them out to this persistent directory.</p><p style="margin-top: 15px; margin-right: 0px; margin-bottom: 0px !important; margin-left: 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px; ">Another idea could when the user does a submit to get the file, it checks to see if the repo is up to date, then if not, updates it. Probably have a time aspect to it, so it only does it everyday for instance</p><div><br></div></div><div><br></div><div>looking for idea's here for the src files</div><div><br></div><div>-luke</div></body></html>