Skip to content

Commit a160d9a

Browse files
committed
Initial OneNoteApi sources
0 parents  commit a160d9a

26 files changed

+2212
-0
lines changed

.gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
*.html text diff=html
5+
*.css text
6+
*.js text
7+
8+
*.csproj text merge=union
9+
*.sln text merge=union eol=crlf

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.vs
2+
build
3+
bundle
4+
node_modules
5+
serverRoot
6+
src/definitions
7+
target
8+
*.user

.vscode/settings.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"editor.formatOnType": true,
4+
"editor.insertSpaces": false,
5+
"editor.renderWhitespace": true,
6+
"files.exclude": {
7+
"**/.git": true,
8+
"**/.DS_Store": true,
9+
"build/": true,
10+
"serverRoot/": true,
11+
"target/": true,
12+
"node_modules/": true,
13+
"src/definitions": true
14+
}
15+
}

.vscode/tasks.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "0.1.0",
3+
"command": "gulp",
4+
"isShellCommand": true,
5+
"args": [
6+
],
7+
"tasks": [{
8+
"taskName" : "default",
9+
"args": [],
10+
"isBuildCommand": true,
11+
"problemMatcher": "$msCompile"
12+
}]
13+
}

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 OneNoteDev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

OneNoteApi.csproj

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" />
4+
<PropertyGroup>
5+
<ProjectGuid>{523C9308-B7F5-4C53-8A33-FCA2F34F6AE3}</ProjectGuid>
6+
<OutputType>Library</OutputType>
7+
<OutputPath>target\</OutputPath>
8+
<IntermediateOutputPath>build\</IntermediateOutputPath>
9+
</PropertyGroup>
10+
<ItemGroup>
11+
<Content Include="*.json" />
12+
<Content Include="*.js" />
13+
<Content Include="src\**\*" Exclude="src\**\*.ts*" />
14+
<TypeScriptCompile Include="src\**\*.ts*" />
15+
</ItemGroup>
16+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
17+
<TypeScriptCompileOnSaveEnabled>False</TypeScriptCompileOnSaveEnabled>
18+
<TypeScriptJSXEmit>Preserve</TypeScriptJSXEmit>
19+
<TypeScriptModuleKind>CommonJS</TypeScriptModuleKind>
20+
<TypeScriptTarget>ES5</TypeScriptTarget>
21+
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
22+
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>
23+
<TypeScriptOutFile />
24+
<TypeScriptOutDir />
25+
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
26+
<TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
27+
<TypeScriptSourceMap>True</TypeScriptSourceMap>
28+
<TypeScriptMapRoot />
29+
<TypeScriptSourceRoot />
30+
</PropertyGroup>
31+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />
32+
<Target Name="Build" />
33+
</Project>

README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# OneNoteApi
2+
JavaScript library to make calling the OneNote API easier.
3+
4+
## Setup
5+
### 1. Install npm -- https://nodejs.org/en/download/
6+
7+
### 2. Install gulp globally:
8+
```sh
9+
$ npm install --global gulp
10+
```
11+
(Note: on windows, you also need to add "%appdata%\npm" to your PATH)
12+
13+
### 3. Install the OneNoteApi packages
14+
From the root of this project, run:
15+
```sh
16+
$ npm install
17+
```
18+
19+
### 4. Setup the other dependencies
20+
From the root of this project, run:
21+
```sh
22+
$ gulp setup
23+
```
24+
25+
### 5. Build and Test
26+
Now just run:
27+
```sh
28+
$ gulp
29+
```
30+
31+
## Congratulations!
32+
At this point you should see the tests passing, and see the packaged code in the `target` folder
33+
34+
35+
### Other Gulp shortcuts
36+
#### Gulp clean
37+
```sh
38+
$ gulp clean
39+
```
40+
Removes all of the generated files from `build`, and uninstalls anything done in `setup`
41+
42+
#### Gulp setup
43+
```sh
44+
$ gulp setup
45+
```
46+
Installs the d.ts files
47+
48+
#### Gulp build
49+
```sh
50+
$ gulp build
51+
```
52+
(Note: this is currently the default command when you run `gulp`)
53+
The command you will use the most often when making code changes:
54+
- Compiles LESS and TypeScript into /build
55+
- Bundles the JavaScript modules together into /bundle
56+
- Exports all the needed files to /target
57+
58+
#### Gulp runTests
59+
```sh
60+
$ gulp runTests
61+
```
62+
Run all of the unit tests on the command line

0 commit comments

Comments
 (0)