ckeditor / ckeditor4-angular

Official CKEditor 4 Angular component.
Other
55 stars 32 forks source link

Add release tools #13

Closed mlewand closed 5 years ago

f1ames commented 5 years ago

From what I see there is now ng build (and ng-build --prod) and also build-package script (which uses ng-packagr underneath).

I assume build-package was used previously to build package published to npm? So few thinks:

cc @engineering-this @jacekbogdanski

engineering-this commented 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.

engineering-this commented 5 years ago

☝️ Actually README should be updated with above information.

f1ames commented 5 years ago

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:

image

engineering-this commented 5 years ago

Actually there is another issue. Both build-package and ng build outputs to same dist directory.

engineering-this commented 5 years ago

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.