-
-
Notifications
You must be signed in to change notification settings - Fork 433
Restructure builds #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add TypeScript as dev dependency - Use npm scripts instead of `node build`. Update docs. - Move build.js to separate folder to declutter root
LGTM 👍 Side note: Why is there two different build paths? Why not just move that into the scripts directly? |
Do you mean why is there this code? if (semver.lt(typescript.version, '1.6.0-0')) {
exec('tsc index.ts --module commonjs', cb)
}
else {
exec('tsc index.ts --module commonjs --moduleResolution classic', cb)
} It's because right now I have to use the classic module resolution, so I need to specify that. However, if I specify that for TS 1.5 I get an error back saying unknown option. Once we ditch support for TS 1.5 the
Not sure I follow. |
You could use If I'm reading this correct (below), build would be running after the initial install with the correct
|
@@ -4,9 +4,10 @@ | |||
"description": "TypeScript loader for webpack", | |||
"main": "index.js", | |||
"scripts": { | |||
"pretest": "node build", | |||
"build": "node scripts/build", | |||
"pretest": "npm run build", | |||
"test": "node ./node_modules/mocha/bin/mocha --reporter spec test/run.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.
Unrelated, but thoughts on code coverage? Also, this line could be just mocha --reporter spec test/run.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.
I haven't really given much thought to code coverage, but 👍 if you want to implement it :D
That's true, but we'd lose build support when actively developing for TS 1.5. Meaning...
would fail. But given that I haven't made any 1.5.3-specific changes in a while and I do want to eventually drop support for it, I would be OK with this. At the time that I implemented this 1.6.0-beta wasn't even released yet so keeping 1.5.3 support was more important. |
One other issue with dropping |
Yeah, drop pretest. It's already built. The version we build against we can configure anytime, the version we run is definitely less configurable. |
@blakeembrey I integrated your suggestions so I'm going to go ahead and merge. Thanks! |
node build
. Update docs.Meant to resolve this comment
cc @blakeembrey