- Make sure you have NodeJS and NPM installed.
- Fork this repo.
- Clone the fork locally.
- From the root of the project, run
npm install
.
To build the package, run npm run lib:buildSkipNpm
.
The lib:buildSkipNpm
does the following:
- Run
./scripts/scripts.sh
, withbuild-lib
passed as the script name to run and the--skipNpm
flag to be passed to thebuild-lib
script. - Run
./scripts/build-lib.sh
with the--skipNpm
flag (which skips publishing to NPM). - Output the build artifacts to the
dist/ngx-ytd-api-lib
folder.
The build artifacts can be used on another project with npm pack ./dist/ngx-ytd-api-lib
, which outputs a tarball in the project root.
This tarball can then be used on another project with npm link ./<path>/ngx-ytd-api-<version>.tgz
.
To lint the package, run npm run lib:lint
.
The lintLib
script does the following:
- Lint the library using Angular CLI's
lint
command.
To test the package, run npm run lib:test
.
The lib:test
script does the following:
- The same steps as what the
lib:buildSkipNpm
script does. - Test the library using Angular CLI's
test
command.
To run the demo, run npm run demo:serve
.
The demo:serve
script does the following:
- The same steps as what the
lib:buildSkipNpm
script does. - Serves the demo w/ Angular CLI's
serve
command.
Open localhost:4200
in your browser and you should be able to view the demo.