user1928596
user1928596

Reputation: 1763

How to build primeng from source code after cloning

I struggled a bit to build primeng from source, after checking the doc of angular-cli (spoiler: didn't help, they don't follow the standard) I tried all these

ng build
ng build -c production
... --aot
... --prod
...

then read the code, and some forum questions, I found the following

Upvotes: 0

Views: 463

Answers (3)

Armin Fisher
Armin Fisher

Reputation: 410

ng build --project primeng-library

and add these two lines to the [production] section in the .browserslistrc file:

not ios_saf 15.2-15.3
not safari 15.2-15.3

Upvotes: 0

user1928596
user1928596

Reputation: 1763

EDIT:
@ShaneCoder is the correct one now

Old answer: < 9.x.x
Here are the steps:

gulp clean
gulp build-assets
gulp build-exports
tsc --build tsconfig-release.json
npm pack

you can the create a release on github, and refrence it using it's URL in your package.json instead of the version number: ex: https://github.com/<YOUR_USERNAME>/primeng/releases/download/8.0.0-rc2/primeng-8.0.0-rc.2-SNAPSHOT.tgz...

Upvotes: 0

ShaneCoder
ShaneCoder

Reputation: 781

The build process has changed to use ng-packagr in primeng 9. This method was confirmed in primeng 10. To build:

npm install ng-packager --save-dev
npm run build-lib

I haven't built version 9 using ng-packagr. Should be the same according to this link.

Upvotes: 1

Related Questions