excel-shared v0.1.8
ExcelShared
This project was generated with Angular CLI version 7.1.4.
Development server
Run npm run start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Code scaffolding
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
ng g c comparisons-dialog --project=components - replace "comparisons-dialog" with the component of your choosing
Build
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Running unit tests
Run npm run test to execute the unit tests via Karma.
Angular Testing Guide
Using Locally
- In your new portal project, change the package.json line
"@excelhealth/shared-components": "0.0.3",to"@excelhealth/shared-components": "../excel-shared/dist/components",. Replace"../excel-shared/dist/components"with the relative library dist directory npm iin consuming appng servein consuming app- Make changes to your local library, and run
npm run watchfrom the library project root to see changes automatically appear in your new portal local web server. - For easier local development, run
npm run startin the library root to take you to the kitchen sink, so you can develop components easily without building each time.
Publishing
- Build component library (see above)
- navigate to dist/components directory
- run
npm publish
Helpful hints
npm run buildc -- --watchornpm run watchto watch build the library for local developmentFor shared component development, you can run the shared component app project, by running
ng sornpm run startin this projects root. Compiling / hot reloading will be much faster than linking it to the app project. See app.component.ts for more info!