-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: make packaging more flexible #6143
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
build: make packaging more flexible #6143
Conversation
* Makes the packaging more flexible by no longer including checks that are specific to the Angular Material project (e.g `material` => `lib` mapping) * Updates the code to be more readable by making the packaging more object orientated (TS compilation helpers shouldn't be part of the gulp task generation)
e3b5ba9
to
a3509a3
Compare
export const examplesPackage = new BuildPackage('material-examples', [materialPackage, cdkPackage]); | ||
|
||
// To avoid refactoring of the project the material package will map to the source path `lib/`. | ||
materialPackage.packageRoot = join(buildConfig.packagesDir, 'lib'); |
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.
What do you you think of making the second constructor arg a config / options object so that it looks like
export const materialPackage = new BuildPackage('material', {
deps: [cdkPackage],
root: join(buildConfig.packagesDir, 'lib'),
});
?
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 wanted to avoid something like that. It's really a special case that we want to overwrite the packageRoot
here and it should not really be done through the build package.
Normally the build config is responsible for changing such things, but since this is really a special case I think this would be fine (it's just a single line; which is pretty clear IMO)
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 feel strongly either way
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. |
material
=>lib
mapping)