Skip to content

Commit 7f4e941

Browse files
committed
Webpack with TSD generation
1 parent f150e40 commit 7f4e941

8 files changed

+292
-90
lines changed

Diff for: package-lock.json

+122-61
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+11-8
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
"version": "2.0.6",
33
"name": "onenoteapi",
44
"description": "JavaScript library to make calling the OneNote API easier.",
5-
"main": "target/oneNoteApi.js",
5+
"main": "dist/OneNoteApi.js",
6+
"types": "dist/OneNoteApi.d.ts",
67
"homepage": "https://github.com/OneNoteDev/OneNoteApi#readme",
78
"author": "Microsoft Coorporation",
89
"license": "MIT",
910
"scripts": {
10-
"build": "webpack"
11+
"build": "rimraf dist && cross-env NODE_ENV=production webpack --progress --colors && rimraf dist/types"
1112
},
1213
"repository": {
1314
"type": "git",
1415
"url": "git+https://github.com/OneNoteDev/OneNoteApi.git"
1516
},
1617
"devDependencies": {
1718
"browserify": "^13.0.0",
18-
"content-type": "^1.0.2",
19+
"cross-env": "^5.1.4",
1920
"del": "^2.0.2",
2021
"dts-bundle": "^0.7.3",
22+
"dts-bundle-webpack": "^1.0.0",
2123
"file-system": "^2.2.1",
2224
"globby": "^4.0.0",
2325
"gulp": "^3.9.0",
@@ -33,22 +35,23 @@
3335
"merge-stream": "^1.0.0",
3436
"node-qunit-phantomjs": "^1.4.0",
3537
"qunitjs": "^1.20.0",
38+
"rimraf": "^2.6.2",
3639
"run-sequence": "^1.1.4",
3740
"ts-loader": "^4.2.0",
3841
"tsd": "^0.6.5",
39-
"tslint": "^3.9.0",
42+
"tslint": "^5.10.0",
4043
"typescript": "^2.8.3",
4144
"vinyl-source-stream": "^1.1.0",
4245
"webpack": "^4.6.0",
43-
"webpack-cli": "^2.1.2"
46+
"webpack-cli": "^2.1.2",
47+
"webpack-merge": "^4.1.2"
4448
},
4549
"files": [
4650
"README.*",
47-
"target/oneNoteApi.d.ts",
48-
"target/oneNoteApi.js",
49-
"target/oneNoteApi.min.js"
51+
"dist/**/*"
5052
],
5153
"dependencies": {
54+
"content-type": "^1.0.2",
5255
"es6-promise": "^4.2.4"
5356
}
5457
}

Diff for: src/scripts/errorUtils.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/// <reference path="oneNoteApi.ts"/>
2-
31
export enum RequestErrorType {
42
NETWORK_ERROR,
53
UNEXPECTED_RESPONSE_STATUS,

Diff for: src/scripts/oneNoteApiBase.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/// <reference path="../definitions/content-type/content-type.d.ts"/>
2-
31
import {ErrorUtils, RequestErrorType, RequestError} from "./errorUtils";
42

53
import * as ContentType from "content-type";

Diff for: src/tests/oneNotePage_tests.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/// <reference path="../definitions/qunit/qunit.d.ts" />
2-
31
import {OneNotePage} from "../scripts/oneNotePage";
42

53
let title = "TITLE";

Diff for: tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@
1919
},
2020
"exclude": [
2121
"node_modules",
22-
"dist"
2322
]
2423
}

0 commit comments

Comments
 (0)