Skip to content

Commit 25a6881

Browse files
tinayuangaojelbourn
authored andcommitted
feat(pixacto): use TypeScript for tooling and refactor into tools/ (#3732)
Move code to TypeScript and perform several clean-up refactorings
1 parent de8b97f commit 25a6881

20 files changed

+465
-261
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/screenshots
88

99
# dependencies
10-
/node_modules
10+
node_modules
1111
/bower_components
1212

1313
# Dart

functions/index.js

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

functions/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"@google-cloud/storage": "^0.8.0",
66
"firebase-admin": "^4.1.3",
77
"firebase-functions": "^0.5.2",
8-
"jsonwebtoken": "^7.3.0"
8+
"jsonwebtoken": "^7.3.0",
9+
"request": "^2.81.0"
910
}
1011
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@angular/platform-browser-dynamic": "^4.0.0",
4343
"@angular/platform-server": "^4.0.0",
4444
"@angular/router": "^4.0.0",
45+
"@google-cloud/storage": "^0.8.0",
4546
"@types/chalk": "^0.4.31",
4647
"@types/fs-extra": "0.0.37",
4748
"@types/glob": "^5.0.30",
@@ -62,6 +63,7 @@
6263
"dgeni-packages": "^0.16.5",
6364
"firebase": "^3.7.2",
6465
"firebase-admin": "^4.1.2",
66+
"firebase-functions": "^0.5.2",
6567
"firebase-tools": "^2.2.1",
6668
"fs-extra": "^2.0.0",
6769
"glob": "^7.1.1",
@@ -87,6 +89,7 @@
8789
"http-rewrite-middleware": "^0.1.6",
8890
"image-diff": "^1.6.3",
8991
"jasmine-core": "^2.5.2",
92+
"jsonwebtoken": "^7.3.0",
9093
"karma": "^1.5.0",
9194
"karma-browserstack-launcher": "^1.2.0",
9295
"karma-chrome-launcher": "^2.0.0",
@@ -100,6 +103,7 @@
100103
"minimist": "^1.2.0",
101104
"node-sass": "^4.5.0",
102105
"protractor": "^5.1.1",
106+
"request": "^2.81.0",
103107
"resolve-bin": "^0.4.0",
104108
"rollup": "^0.41.6",
105109
"run-sequence": "^1.2.2",
@@ -112,7 +116,7 @@
112116
"ts-node": "^3.0.0",
113117
"tslint": "^5.0.0",
114118
"tslint-no-unused-var": "0.0.6",
115-
"typescript": "~2.1.1",
119+
"typescript": "~2.2.1",
116120
"uglify-js": "^2.8.14",
117121
"web-animations-js": "^2.2.2"
118122
}

tools/gulp/tasks/coverage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import {task} from 'gulp';
22
import {existsSync} from 'fs-extra';
33
import {COVERAGE_RESULT_FILE} from '../constants';
44
import {spawnSync} from 'child_process';
5-
import {isTravisPushBuild} from '../util/travis-ci';
5+
import {isTravisMasterBuild} from '../util/travis-ci';
66
import {openFirebaseDashboardDatabase} from '../util/firebase';
77

88
task('coverage:upload', () => {
99
if (!existsSync(COVERAGE_RESULT_FILE)) {
1010
throw new Error('No coverage file has been found!');
1111
}
1212

13-
if (!isTravisPushBuild()) {
13+
if (!isTravisMasterBuild()) {
1414
throw new Error('Coverage results will be only uploaded inside of Travis Push builds.');
1515
}
1616

tools/gulp/tasks/payload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {join} from 'path';
33
import {statSync} from 'fs';
44
import {DIST_ROOT} from '../constants';
55
import {spawnSync} from 'child_process';
6-
import {isTravisPushBuild} from '../util/travis-ci';
6+
import {isTravisMasterBuild} from '../util/travis-ci';
77
import {openFirebaseDashboardDatabase} from '../util/firebase';
88

99
const bundlesDir = join(DIST_ROOT, 'bundles');
@@ -23,7 +23,7 @@ task('payload', ['library:clean-build'], () => {
2323
console.log('Payload Results:', JSON.stringify(results, null, 2));
2424

2525
// Publish the results to firebase when it runs on Travis and not as a PR.
26-
if (isTravisPushBuild()) {
26+
if (isTravisMasterBuild()) {
2727
return publishResults(results);
2828
}
2929

0 commit comments

Comments
 (0)