# sp2013sync

> Gulp plugin for synchronizing local files with SharePoint 2013

Latest version **1.0.5** (published 2020-12-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install sp2013sync
pnpm add sp2013sync
yarn add sp2013sync
bun add sp2013sync
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-12-24 |
| First published | 2020-12-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 34.5 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mhazebroucq |
| Maintainers | mhazebroucq |
| Keywords | sharepoint, 2013, sp2013, gulp, watch, sync, download |

## Links

- npm: https://www.npmjs.com/package/sp2013sync
- Repository: https://github.com/mhazebroucq/gulpsynchLocalToRemote
- Homepage: https://github.com/mhazebroucq/gulpsynchLocalToRemote#readme
- Issues: https://github.com/mhazebroucq/gulpsynchLocalToRemote/issues
- npm.io page: https://npm.io/package/sp2013sync

## Dependencies (6)

- [util](https://npm.io/package/util.md) 0.10.3
- [moment](https://npm.io/package/moment.md) 2.21.0
- [through2](https://npm.io/package/through2.md) 2.0.3
- [gulp-util](https://npm.io/package/gulp-util.md) 3.0.8
- [sp-request](https://npm.io/package/sp-request.md) 2.1.3
- [gulp-confirm](https://npm.io/package/gulp-confirm.md) ^1.0.8

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2020-12-24
- 1.0.4 — 2020-12-24
- 1.0.3 — 2020-12-24
- 1.0.2 — 2020-12-24
- 1.0.1 — 2020-12-24

## README

v1.2  - Maxime  
Fork from https://github.com/jeffangama/gulpsynchLocalToRemote  
   
# Objective : 
Work on SharePoint 2013 files in VSCode.  
Using gulp task you can download, upload and watch files.  

You can clone this repo or integrate the synch tools by getting the installation files in InstallationFiles folder.  
You can install in into an existing project bu using procedure below.

# Contents
* [Installation](#Installation (if you want to install it in your existing project))
* [Usage](#Usage)


# Installation 

If you clone the repo, do not follow the below procedure :

## Step 0
Install node.js :)

## Step 1

npm init

## Step 2
Open package.json, after description, add "," then paste
```javascript
"dependencies": {
    "gulp": "^3.9.1",
    "gulp-clean": "^0.3.2",
    "gulp-plumber": "^1.1.0",
    "gulp-process-only-modified-files": "^1.0.0",
    "node-file-cache": "^1.0.2",
    "gulp-spsync-creds": "^2.3.8",
    "sp2013sync": "^1.0.5"
  },
```

## Step 4
Install dependencies
```bash
npm install --save
```

## Step 5
Copy the files config.js, gulpfile.js and settings.js into your solution folder.

## Step 6
Create a creds.js file int the folder parent of your solution folder .
This file is outside of the solution folder to avoid to upload it to git.

```javascript
module.exports = {
    dev: {        
    "username": "user@domain.com",
    "password": "password"
    }
}.dev;
```

## Step 7
Configure config.json
```javascript
    "site": "http://test-site-url",
    "skipInstall": false,
    "verbose": "false",
    "config":"Dev",
    "remoteFoldersToGet":["SiteAssets","_catalogs/masterpage"], //folders for which you want to retrieve content in the populate task
    "location":"src" //location where files will be downloaded, uploaded and watched
```
This file allows you to configure many profiles and select the one you want to activate by exporting the wanted config name.

# Usage

* A) Push the files to SharePoint immediately. It will need a confirm and then it will create the folder by it self.  
Only the updated files since last push will be pushed. If it is the first push, all files will be pushed.  
 (if you change the option published to false in config.json, the default gulp task will not publish files)
```bash
gulp 
```
* B) Watch changes and push immediately each file you update
```bash
gulp watch
```
* C) Same as A) with publish (if you change the option published to false in config.json, the default gulp task will not publish files)
```bash
gulp publish
```    
* D) Publish all files to SharePoint regardless of the modification dates
```bash
gulp publish-all
```    
* E) If you want to retrieve all items from the folders defined in "remoteFoldersToGet" :
```bash
gulp populate
```

---
_Source: https://npm.io/package/sp2013sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
