-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: move packaging in separate folder #4719
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
tools/gulp/packaging/build-utils.ts
Outdated
@@ -0,0 +1,85 @@ | |||
import {writeFileSync, readFileSync} from 'fs-extra'; | |||
import {join} from 'path'; | |||
import {LICENSE_BANNER, MATERIAL_VERSION} from '../constants'; |
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 really dislike grab-bag "util" files. Can we break this up into individual files?
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 sure I'm a bit afraid of having 5 files just for small functions. What do you think?
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.
Small, single-purpose files are just much easier to grok than have a bunch of unrelated stuff in one 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.
Okay I will try to see how I can split them up.
} | ||
|
||
/** Builds the bundles for the specified package. */ | ||
export async function buildPackageBundles(entryFile: string, packageName: string) { |
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.
Maybe put composeRelease
and buildPackageBundles
into their own files?
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 like that idea. Do you have any good ideas for the file names?
build-release.ts
build-normal.ts
Something like that?
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.
Why not build-bundles.ts
and compose-release.ts
?
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.
Sounds good. I like that
|
||
|
||
/** Inlines HTML and CSS resources into `metadata.json` files. */ | ||
export function inlinePackageMetadataFiles(packagePath: string) { |
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'd prefer this to stay in its own file
tools/gulp/packaging/ts-compiler.ts
Outdated
} | ||
|
||
/** Formats the TypeScript diagnostics into a error string. */ | ||
export function formatDiagnostics(diagnostics: ts.Diagnostic[], baseDir: string): string { |
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.
Separate transpile and diagnostics into separate files?
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.
Ugh this ends up in a lot of files. If we do this then we should have a folder packaging/typescript
?
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 think it would need a a separate directory- maybe just transpile.ts
and typescript-diagnostics.ts
?
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.
Sounds a bit unnecessary to be honest. The diagnostics are actually part of the "custom" ts-compiler.
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.
If they're not used outside this file then they can stay there without being exported.
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.
Yeah good point with the export
.
Moves all related packaging code into a `packaging` folder inside of gulp. At some point we can move the folder completely to `tools/` and can share it with other repositories like `flex-layout`.
14031f3
to
a4f6a86
Compare
@jelbourn Moved the different build utils into separate files. Let me know if you want any further changes |
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.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Moves all related packaging code into a
packaging
folder inside of gulp.At some point we can move the folder completely to
tools/
and can share it with other repositories likeflex-layout
.