-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(typescript): adding typescript to protractor #2902
Conversation
The linter was checking the generated javascript files from typescript. Removing the check to lib as a "fix". |
@@ -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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the strategy of compiling files in the client is very different from what we do elsewhere. why not ship compiled .js files to the client?
825cc59
to
9e09f01
Compare
@@ -0,0 +1,4 @@ | |||
# TODO: remove this file when all files have been replaced with typescript | |||
configParser.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you still need this? seems like the file is now removed by this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still needed. On the prepublish step, the transpiled javascript files are being copied into the lib folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, because the published app references lib/file.js in package.json
maybe it should reference built/file.js instead, like Julie suggests
a390b59
to
63162f5
Compare
Added jslint check back for |
8f892e2
to
999bf07
Compare
@@ -12,3 +12,6 @@ xmloutput* | |||
npm-debug.log | |||
|
|||
*.swp | |||
|
|||
typings/ | |||
built/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
built/ is already at the top from the other PR, remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Just a couple cleanup comments, otherwise looks good! |
93de546
to
78f7c91
Compare
Converting a 3 files over to typescript. Adding an `npm prepublish` step that will use gulp to download the typings, transpile the files with tscto the built/ directory and copy the rest of the javascript files from lib/ to the built/ folder. Also adding scripts to package.json for `npm run tsc` and `npm run tsc:w` for transpiling help.
Reference feature request: #1203 |
Converting a 3 files over to typescript.
On the
prepublish
step, it will download the typings, transpile the files with tsc, and move the transpiled javascript files from the built directory to the lib.Also adding scripts to package.json for
npm run tsc
andnpm run tsc:w
for transpiling.