Skip to content

Commit 9f0f60a

Browse files
author
Sassoun Derderian
committed
refactor: Replace Browserify to Webpack, code in Typescript
1 parent e4f2603 commit 9f0f60a

30 files changed

Lines changed: 1310 additions & 9784 deletions

dist/workfront.js

Lines changed: 762 additions & 8915 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/workfront.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/workfront.min.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/browser/login.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@
2020
<title>Login example</title>
2121
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
2222

23-
<!-- The script below is not needed if your browser supports ES6 promises -->
24-
<script src="https://www.promisejs.org/polyfills/promise-6.0.0.min.js"></script>
25-
26-
<script src="/dist/workfront.min.js"></script>
23+
<!--<script src="/dist/workfront.min.js"></script>-->
24+
<script src="/dist/workfront.js"></script>
2725
<script>
26+
console.log(window.Workfront)
2827
function doLogin() {
2928
var url = document.getElementById('url').value;
3029
var username = document.getElementById('username').value;
3130
var password = document.getElementById('password').value;
3231

33-
var instance = new window.Workfront.Api({url: url, version: '3.0'});
32+
var instance = new window.Workfront.Api({url: url, version: '5.0'});
3433
instance.login(username, password).then(function(data){
3534
console.log(data);
3635
}, console.error);

examples/node/login.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
* Logs in
1919
*/
2020

21-
var ApiFactory = require('./../../').ApiFactory;
21+
// var ApiFactory = require('./../../').ApiFactory;
2222
var util = require('util');
23+
var ApiFactory = require('./../../dist/workfront').ApiFactory;
2324

2425
var instance = ApiFactory.getInstance({
2526
url: 'http://localhost:8080',

index.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
"name": "workfront-api",
33
"version": "1.4.0",
44
"description": "A Workfront API for the Node.js and the Web",
5-
"main": "index.js",
5+
"main": "dist/workfront.js",
66
"dependencies": {
7+
"es6-promise": "4.0.5",
78
"form-data": "0.2.0",
8-
"promise": "7.1.1",
9+
"isomorphic-fetch": "2.2.1",
910
"workfront-api-constants": "1.0.4"
1011
},
1112
"devDependencies": {
13+
"awesome-typescript-loader": "3.0.8",
1214
"browserify": "13.0.1",
1315
"chai": "3.5.0",
1416
"chai-as-promised": "5.3.0",
@@ -29,8 +31,13 @@
2931
"sinon": "^1.12.2",
3032
"sinon-as-promised": "4.0.0",
3133
"sinon-chai": "2.8.0",
34+
"source-map-loader": "0.1.6",
35+
"tslint": "4.5.1",
36+
"tslint-loader": "3.4.3",
37+
"typescript": "2.2.1",
3238
"vinyl-buffer": "1.0.0",
33-
"vinyl-source-stream": "1.1.0"
39+
"vinyl-source-stream": "1.1.0",
40+
"webpack": "2.2.1"
3441
},
3542
"scripts": {
3643
"test": "gulp test-ci",

src/Api.js

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)