sympmarc / SPServices

SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.
MIT License
208 stars 61 forks source link

grunt deployment to SPOnline via webdav #27

Open spcfran opened 8 years ago

spcfran commented 8 years ago

In the README.md, where it talks about deploying to a SP folder:

//YourTenantNameHere.sharepoint.com@SSL/DavWWWRoot/sites/dev/Shared Documents/SPServices-dev

That did not work for me. After following this article and using backslashes, I ended up making it work:

\\YourTenantNameHere.sharepoint.com@SSL\DavWWWRoot\sites\dev\Shared Documents\SPServices-dev

Of course the backslashes need to be escaped in the me.build.json file:

{
    "deployLocation": "\\\\YourTenantNameHere.sharepoint.com@SSL\\DavWWWRoot\\sites\\dev\\Shared Documents\\SPServices-dev"
}

I'm not sure if it's just about the backslashes or also the whole configuration steps in the article, perhaps it's worth doing a bit more research and updating the readme?

purtuga commented 8 years ago

WebDAV is a pain.  It still works for me when I'm connected to a SP2010 system but not for SP2013.   Your changes look good. I think I initially had forward slashes because I was using a bash command line shell.  Want to make the contribution? - you should be a pro now :-) For SP2013 - I suggest setting up the path to a local OneDrive sync'ed folder instead.  That is how I currently do it for o365

Paul -- sent from mobile

sympmarc commented 8 years ago

I still map a drive with 2013 and/or SharePoint Online. I just have to Open with Explorer in IE every time I need to connect.

Right now, my me.build.json contains:

{
    "deployLocation": "J:/"
}
purtuga commented 8 years ago

That stopped working form me when I got my new PC (win8.1).  For the most part: OneDrive has been ok.  But good to know WebDAV is still an option. 

Paul -- sent from mobile

spcfran commented 8 years ago

I just tried the process on a different computer, also Windows 8.1, and all I needed was to log into tenant.sharepoint.com using Internet Explorer, ticking the Keep me signed in checkbox (it didn't work the first time when I didn't check it).

Now typing \\YourTenantNameHere.sharepoint.com@SSL\DavWWWRoot\sites\dev\Shared Documents\SPServices-dev in windows explorer gets me there. I assume mapping the drive would work at this point.

I will try on Windows 10 at home tonight and will propose an update to the README.md file then (perhaps just a link to this discussion?)

sympmarc commented 7 years ago

@juliemturner and I have been fiddling with spsave recently, which looks like a better way to go for publishing changes to SharePoint. We've had some trouble getting watch to work, but we'll undoubtedly publish our learnings at some point.

purtuga commented 7 years ago

I heard about spsave from one of the NJ SP Meetup (Tom Daly) and bookmarked it to maybe revisit in the future. Interested in what you Julie come up with. I don't think it's compatible with SP2010. Only 2013 and above, right? Also: looks like there is already a Gulp plugin.  

Paul -- sent from mobile

sympmarc commented 7 years ago

Good question on down versions. I just checked the spsave npm page and it says: "Nodejs module for saving files in SharePoint (SharePoint 2013\2016, SharePoint Online)". Bummer for older versions, but if it works well for newer versions, that's a winner. Open in File Explorer seems to be withering away...

johnnliu commented 7 years ago

spsave uses sp-request which relies on _api REST endpoint. so no 2010.

You can use robocopy with Gulp and that can be used for SP2010/2007 via webdev. http://www.binaryjam.com/2016/03/23/vs-code-git-gulp-and-sharepoint/

sympmarc commented 7 years ago

@juliemturner and I just started a blog series on how we're setting things up these days. Stay tooned...