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

Commit

Permalink
feat(typescript): adding typescript to protractor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cnishina committed Feb 4, 2016
1 parent 7ce4919 commit 8c7a8c3
Show file tree
Hide file tree
Showing 28 changed files with 8,773 additions and 302 deletions.
7 changes: 7 additions & 0 deletions bin/protractor
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

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

// Transpile code to javascript prior to running javascript
var spawn = require('child_process').spawnSync;
var transpile = spawn('node_modules/typescript/bin/tsc');
if (transpile.status !== 0) {
throw new Error('Did not convert typescript files to javascript.');
}

require('../lib/cli.js');
2 changes: 2 additions & 0 deletions lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.d.ts
*.js.map
Loading

0 comments on commit 8c7a8c3

Please sign in to comment.