Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 5e56a37

Browse files
committed
feat(typescript): adding typescript to protractor
Converting a few files over to typescript. When running protractor, the typescript files will be transpiled to javascript. Also adding scripts to package.json for `npm run tsc` and `npm run tsc:w` to watch for changes.
1 parent 7ce4919 commit 5e56a37

27 files changed

+8770
-301
lines changed

bin/protractor

+7
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22

33
process.env.NODE_ENV = process.env.NODE_ENV || 'test';
44

5+
// Transpile code to javascript prior to running javascript
6+
var spawn = require('child_process').spawnSync;
7+
var transpile = spawn('node_modules/typescript/bin/tsc');
8+
if (transpile.status !== 0) {
9+
throw new Error('Did not convert typescript files to javascript.');
10+
}
11+
512
require('../lib/cli.js');

lib/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.d.ts
2+
*.js.map

0 commit comments

Comments
 (0)