<commit_before># sp-angular-webpack-starter

Starter project for creating apps with client-side technologies in SharePoint using Angular and Webpack

The purpose of this project is three-fold:
 1. Provide a starter project for developers creating SP apps using modern client-side technologies to easily get started with.
 2. Demonstrate an alternative to SharePoint 'apps' and SharePoint REST service access.
 3. Provide a number of samples to demonstrate the types of solutions that can be created with HTML+JS with sharepoint.

###Quick Start

##### Prerequisites
To start developing with SP-Angular-Webpack-Starter you'll need a few things:
First, make sure you've got a recent version of node.js and git installed.

I also recommend VSCode as an editor, but feel free to use whatever editor suits your fancy.

Optionally, your windows based dev box should be configured to the [Microsoft Guidelines for Node.js development](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules)
however, this starter will work without these dependencies. It's only if you would like to use the automated deployment scripts (such as deploy-proxy-spo) where these become necessary -- if you're manually deploying your files,
no need to install these, but definately suggest it if you're doing node development on windows.

##### Clone and Install Dependencies
Next, you'll need to clone the sp-angular-webpack repository and install its dependencies.
``` bash
# clone the repo
$ git clone https://github.com/beyond-sharepoint/sp-angular-webpack/ my-app

# change directory to your app
$ cd my-app

# install the dependencies with npm
$ npm install
```

##### Configure
Once you have the dependencies installed, let's configure the app to point to your SharePoint tenant.

You can either edit the configuration file located in ./src/HostWebProxy.config.json in a text editor, or use
the convienant built-in confuration tool.
``` bash
$ npm run configure
```

If you want to enable communication to additional site collections, simply add those server-relative urls to the knownSiteCollections
array within ./src/HostWebProxy.config.json.

##### Build and Deploy HostWebProxy
Now, let's deploy the proxy file that enables cross-domain communication to your app. This proxy file is a small <15kb file that lives within
any document library on your SharePoint tenant or on-prem installation. 

If you're deploying to SharePoint Online, the starter comes with a npm run script that automates deployment and automatically uses the
proxyUrl you specified in the configuration above. You'll be prompted for your SharePoint Online credentials.

> Note: deploy-proxy-spo requires that node-gyp be installed, please follow the installation directions at https://github.com/nodejs/node-gyp
> and then execute `npm install` once again.

``` bash
$ npm run deploy-proxy-spo
```

If you're deploying to an on-prem SharePoint farm (or you'd like to perform this step manually on SPO),
you can also build the proxy and simply drag and drop it into the target document library.

``` bash
$ npm run build-proxy
```

You'll find a file named 'HostWebProxy.aspx' within the /dist folder. Simply upload this file to the document that was configured above.

> For the two above operations, you'll need at least edit or designer permisions on a target web.
> Specifically you'll need the 'Add and Customize Pages' Permission Level.<commit_msg>Add known site collection example<commit_after># sp-angular-webpack-starter

Starter project for creating apps with client-side technologies in SharePoint using Angular and Webpack

The purpose of this project is three-fold:
 1. Provide a starter project for developers creating SP apps using modern client-side technologies to easily get started with.
 2. Demonstrate an alternative to SharePoint 'apps' and SharePoint REST service access.
 3. Provide a number of samples to demonstrate the types of solutions that can be created with HTML+JS with sharepoint.

###Quick Start

##### Prerequisites
To start developing with SP-Angular-Webpack-Starter you'll need a few things:
First, make sure you've got a recent version of node.js and git installed.

I also recommend VSCode as an editor, but feel free to use whatever editor suits your fancy.

Optionally, your windows based dev box should be configured to the [Microsoft Guidelines for Node.js development](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules)
however, this starter will work without these dependencies. It's only if you would like to use the automated deployment scripts (such as deploy-proxy-spo) where these become necessary -- if you're manually deploying your files,
no need to install these, but definately suggest it if you're doing node development on windows.

##### Clone and Install Dependencies
Next, you'll need to clone the sp-angular-webpack repository and install its dependencies.
``` bash
# clone the repo
$ git clone https://github.com/beyond-sharepoint/sp-angular-webpack/ my-app

# change directory to your app
$ cd my-app

# install the dependencies with npm
$ npm install
```

##### Configure
Once you have the dependencies installed, let's configure the app to point to your SharePoint tenant.

You can either edit the configuration file located in ./src/HostWebProxy.config.json in a text editor, or use
the convienant built-in confuration tool.
``` bash
$ npm run configure
```

If you want to enable communication to additional site collections, simply add those server-relative urls to the knownSiteCollections
array within ./src/HostWebProxy.config.json.

for instance:

``` json
"knownSiteCollections": [
  "/",
  "/sites/mysitecollection1",
  "/sites/mysitecollection2"
]
```

##### Build and Deploy HostWebProxy
Now, let's deploy the proxy file that enables cross-domain communication to your app. This proxy file is a small <15kb file that lives within
any document library on your SharePoint tenant or on-prem installation. 

If you're deploying to SharePoint Online, the starter comes with a npm run script that automates deployment and automatically uses the
proxyUrl you specified in the configuration above. You'll be prompted for your SharePoint Online credentials.

> Note: deploy-proxy-spo requires that node-gyp be installed, please follow the installation directions at https://github.com/nodejs/node-gyp
> and then execute `npm install` once again.

``` bash
$ npm run deploy-proxy-spo
```

If you're deploying to an on-prem SharePoint farm (or you'd like to perform this step manually on SPO),
you can also build the proxy and simply drag and drop it into the target document library.

``` bash
$ npm run build-proxy
```

You'll find a file named 'HostWebProxy.aspx' within the /dist folder. Simply upload this file to the document that was configured above.

> For the two above operations, you'll need at least edit or designer permisions on a target web.
> Specifically you'll need the 'Add and Customize Pages' Permission Level.
{'fraction_non_alphanumeric': 0.06406448875689436, 'fraction_numerical': 0.0016970725498515061, 'mean_word_length': 4.6350597609561754, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3884130', 'n_tokens_mistral': 1850, 'n_tokens_neox': 1715, 'n_words': 947}