locked
Editing script&css resources of deployed app without retract&re-deploy RRS feed

  • Question

  • Hi,

    I am looking for efficient and quick way to modify my js files during the develpment of app. Since deploying each modification (retract + deployt) from VS is _SLOW_ i would like to just modify the .js file and then refresh the browser to view the results. So my question is, is there any way to access the js+css files of your deployed app?

    br,

    -hk

    Monday, October 22, 2012 9:54 AM

Answers

  • Sorry, I checked with the VS team and the functionality I mentioned isn't in the currently released build of Visual Studio that you're using.  For now, you'll have to retract/redeploy to see your changes, unfortunately.

    Elisabeth Olson SharePoint PM - MSFT

    • Proposed as answer by Chakkaradeep Chandran Saturday, October 27, 2012 4:30 AM
    • Marked as answer by hkossu Monday, October 29, 2012 11:13 AM
    Wednesday, October 24, 2012 5:00 PM

All replies

  • Hi,

    You can choose developer hosted app model, then you can directly modify files which are hosted in IIS without a need to redeploy your app to SharePoint.


    thank you :)

    Monday, October 22, 2012 2:34 PM
  • Actually, Visual Studio should do this for you automatically when you F5 your app - once the app is deployed, you can edit the client-side files in your app (JS, CSS, ASPX in app webs) and when you save the file VS silently updates it in the running app.

    Elisabeth Olson SharePoint PM - MSFT

    Tuesday, October 23, 2012 7:27 PM
  • Kudos to the VS folks!

    Ricalo

    Wednesday, October 24, 2012 3:27 AM
  • Hi Elisabeth,

    Not sure if i got this.

    1. New Project -> App for Sharepoint 2013 -> Sharepoint Hosted

    2. F5 -> open the application in browser (yes, the "Hello Administrator")

    3. Modify app.js in VS to display alert in function onGetUserNameSuccess()

    4. Nothing happens until i retract &redeploy

    Did i miss something here?

    Thanks in adv,

    -hk

    Wednesday, October 24, 2012 11:17 AM
  • Sorry, I checked with the VS team and the functionality I mentioned isn't in the currently released build of Visual Studio that you're using.  For now, you'll have to retract/redeploy to see your changes, unfortunately.

    Elisabeth Olson SharePoint PM - MSFT

    • Proposed as answer by Chakkaradeep Chandran Saturday, October 27, 2012 4:30 AM
    • Marked as answer by hkossu Monday, October 29, 2012 11:13 AM
    Wednesday, October 24, 2012 5:00 PM
  • Any idea of timeline around when this will become available in VS (weeks, months)?

    Thanks

    Thursday, October 25, 2012 3:47 PM
  • Unfortunately, we can't discuss the timeline for future releases or potential features in the forums.  When the next build of VS is available, you'll see news on http://dev.office.com.

    Elisabeth Olson SharePoint PM - MSFT

    Thursday, October 25, 2012 5:20 PM
  • That's great news about possibly coming changes, but right now I know only one decent way to do it: use SharePoint Designer (aka SPD).

    Basically you need to connect to the app web, modify your files, save, refresh the page in browser, see if something else wrong => modify, save, refresh, etc. SPD is very good in this, it saves quickly and has the handy "Preview in Browser" button on the ribbon.

    But be careful! Obviously SPD won't update your VS files, so once you forget that you're doing something in SPD, you might loose your changes. Thus this approach is only relevant when you have some complicated script and many changes.

    For example, if you refactored some Big Script and obviously you expect a number of errors, so it's much faster to polish off the script in SPD than suffer with VS retract-deploy.

    Myself, I use the rule of three tries. If you notice, that you've already retract-deployed twice and you still get problems with this particular piece of code, when it's time to go to SPD.

    P.S. Also, please don't forget to refresh your browser cache, for instance in IE9, enable "Cache -> Always refresh from server" in Developer Tools (F12).


    Thursday, October 25, 2012 5:44 PM
  • Hi

    Thanks for the answer.

    In future, i would like to se see webdav access to app webs.

    br,

    -hk

    Monday, October 29, 2012 11:12 AM