Closed mlewand closed 5 years ago
ng build
is a command implemented by angular-cli
. It builds the project with examples which are used for manual testing. Additionally calling ng test
or ng e2e
will in fact do ng build
before running automated tests.
build-package
uses only files from src/ckeditor
to build the CKEditor component which is the only way to build package for publishing on NPM.
☝️ Actually README should be updated with above information.
Ok, makes sense👌
So my proposal for solving this issue is to update the readme file as proposed in the above comment and package.json
by adding prepublishOnly
step which runs build-package
script.
One more thing to check is ng build --prod
. I am able to successfully run ng build
and npm run build-package
, but ng build --prod
throws some errors:
Actually there is another issue. Both build-package
and ng build
outputs to same dist
directory.
One more thing to check is ng build --prod. I am able to successfully run ng build and npm run build-package, but ng build --prod throws some errors:
It's some issue with webpack
and terser-js
, probably playing around with different versions of these would fix that issue, however it might bring new problems. I'd remove information about --prod
flag from README, we don't need to build production
version of samples as they are only for internal use.
From what I see there is now
ng build
(andng-build --prod
) and alsobuild-package
script (which usesng-packagr
underneath).I assume
build-package
was used previously to build package published to npm? So few thinks:ng build
command itself or could we always useng-packagr
? Now it is a little confusing that we have two ways to build the package.ng-packagr
gives as over using regularng build
?npm publish
we could useprepublishOnly
package script same as in our React integration.cc @engineering-this @jacekbogdanski