-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add bundle tasks for distribution #588
Conversation
spits out `dist/[name].bundle.js` for each package.
@giladgray listed in the original ticket. The field is called "browser" https://github.com/defunctzombie/package-browser-field-spec |
gulp/typescript.js
Outdated
@@ -53,4 +55,17 @@ module.exports = (gulp, plugins, blueprint) => { | |||
tsResult.dts, | |||
]).pipe(blueprint.dest(project)); | |||
}); | |||
|
|||
const bundleTaskNames = blueprint.projectsWithBlock("typescript").map((project) => { | |||
const taskName = `typescript-bundle-${project.id}`; |
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 doesn't really have anything to do with typescript -- it should just be called bundle-${project.id}
or bundle-dist-${project.id}
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.
soooo i had a similar thought, but it does have to do with the typescript
config block, which is the naming convention for compile tasks: block-name-project
. i can't use blueprint.task()
directly here to enforce that pattern because that method doesn't support callback task definitions, so i had to spell it out by hand.
that said, i don't feel too strongly.
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.
@adidahiya ping on this?
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 don't mind spelling it out by hand rather than using blueprint.task()
; I just think the task name is wrong and it shouldn't be in the gulp/typescript.js
file
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.
and i'm disagreeing with both of those because it has everything to do with the typescript sources
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.
Not really, because generateWebpackBundleConfig
uses dist/index.js
as an entry point (not a TS file). This is the whole deal with splitting up our build process into a tsc
stage and a webpack stage. We can follow up further offline about this if you want.
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.
ok sure i hear that. let's discuss tomorrow, i'm feeling build-y 🔨
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.
offline resolution: move this to gulp/dist.js
That is a big bundle. Filed a follow-up #612 :) |
Fixes #303
Changes proposed in this pull request:
new
typescript-bundle
task group webpacks each package's compiled js files and spits outdist/[name].bundle.js
.Reviewers should focus on: