Skip to content
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: use ng-packagr to generate library #1747

Merged
merged 1 commit into from
Jul 22, 2018

Conversation

trotyl
Copy link
Contributor

@trotyl trotyl commented Jun 28, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Switch to ng-packagr to build package which follows Angular Package Format 6.0.

Highlights:

  • dependencies is not allowed by ng-packagr, only peerDependencies can be used;
  • import * as pkg from 'pkg' are now import pkg from 'pkg';
  • Root package.json no longer used to publish, only for dev purpose now;
  • Package sub-path no longer contains the src segment;

Does this PR introduce a breaking change?

[x] Yes
[ ] No

CSS file imports require remove the /src segment.

Other information

"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be enabled once our lib could pass it.

@trotyl trotyl force-pushed the ng-packagr branch 2 times, most recently from 183b811 to 42cf30f Compare June 28, 2018 06:53
@codecov
Copy link

codecov bot commented Jun 28, 2018

Codecov Report

Merging #1747 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1747   +/-   ##
=======================================
  Coverage   96.07%   96.07%           
=======================================
  Files         466      466           
  Lines       11173    11173           
  Branches     1461     1461           
=======================================
  Hits        10735    10735           
  Misses        126      126           
  Partials      312      312
Impacted Files Coverage Δ
components/tree/nz-tree.service.ts 95.19% <ø> (ø) ⬆️
components/calendar/nz-calendar.component.ts 100% <100%> (ø) ⬆️
...omponents/calendar/nz-calendar-header.component.ts 100% <100%> (ø) ⬆️
...omponents/date-picker/lib/candy-date/candy-date.ts 100% <100%> (ø) ⬆️
components/i18n/nz-i18n.service.ts 75.86% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61dc87b...ce390fc. Read the comment docs.

@trotyl
Copy link
Contributor Author

trotyl commented Jun 29, 2018

Previously I thought the import * as -> import default change could break type-checking without skipLibCheck or allowSyntheticDefaultImports, but turns out it would still be fine.

@trotyl
Copy link
Contributor Author

trotyl commented Jul 5, 2018

Found the whitelistedNonPeerDependencies option which allows dependencies.

@vthinkxie
Copy link
Member

vthinkxie commented Jul 5, 2018

Great, it seems that there are no break changes now.

@trotyl
Copy link
Contributor Author

trotyl commented Jul 5, 2018

@vthinkxie The CSS path is still breaking, previously:

node_modules/ng-zorro-antd/src/ng-zorro-antd.min.css

Now:

node_modules/ng-zorro-antd/ng-zorro-antd.min.css

Copy link
Member

@vthinkxie vthinkxie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hsuanxyz please add back some shell scripts.

@vthinkxie vthinkxie merged commit ea2f41e into NG-ZORRO:master Jul 22, 2018
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Jul 22, 2018
vthinkxie added a commit that referenced this pull request Jul 22, 2018
vthinkxie added a commit that referenced this pull request Jul 22, 2018
revert: "build: use ng-packagr to generate library (#1747)"
vthinkxie added a commit that referenced this pull request Jul 22, 2018
revert: "build: use ng-packagr to generate library (#1747)"
@wzhudev wzhudev mentioned this pull request Aug 23, 2018
3 tasks
wenqi73 pushed a commit to wenqi73/ng-zorro-antd that referenced this pull request Aug 27, 2018
wenqi73 pushed a commit to wenqi73/ng-zorro-antd that referenced this pull request Aug 27, 2018
@vthinkxie vthinkxie mentioned this pull request Jun 28, 2019
86 tasks
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants