This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Libraries > Separated transpile and bundle actions #439
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cli/build-public-library.js
Outdated
'files': [ | ||
skyPagesConfigUtil.spaPathTemp('index.ts') | ||
'exclude': [ | ||
skyPagesConfigUtil.spaPathTemp('runtime') |
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.
Do not transpile (or include) files from Builder's runtime directory.
Blackbaud-PaulCrowder
previously approved these changes
Jul 23, 2018
Codecov Report
@@ Coverage Diff @@
## master #439 +/- ##
==========================================
+ Coverage 99.31% 99.32% +<.01%
==========================================
Files 73 73
Lines 1909 1919 +10
Branches 300 303 +3
==========================================
+ Hits 1896 1906 +10
Misses 13 13
Continue to review full report at Codecov.
|
…der into fix-library-bundler
Related: #417 |
Blackbaud-PaulCrowder
approved these changes
Jul 23, 2018
Blackbaud-MikitaYankouski
pushed a commit
to Blackbaud-MikitaYankouski/skyux-builder
that referenced
this pull request
May 3, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: blackbaud/skyux2#1851
@Blackbaud-BobbyEarl I know we talked about avoiding
child_spawn
, but in this case I couldn't find a way around it. Library builds are failing because we're attempting to transpile and bundle in the same step, which causes some problems during AoT. To fix it, I'm transpiling after the bundle has been created so that they don't interfere with one another.To transpile the files, I need to use Angular's
ngc
(for the metadata), but they don't provide an NPM utility that can be used programmatically, from what I gathered. Also, nearly every tutorial I found recommended that we runngc
through the command-line. Another critical thing to note: Angular 6 provides a first-class way to generate libraries, so the changes in this pull request should be temporary until we can upgrade Builder/UX to the latest Angular/TypeScript.Example tutorial: https://medium.com/@cyrilletuzi/how-to-build-and-publish-an-angular-module-7ad19c0b4464