0.0.1 • Published 6 years ago

med-lib v0.0.1

Weekly downloads
9
License
-
Repository
-
Last release
6 years ago

MedLib

This project was generated with Angular CLI version 6.0.8.

Development server

Run ng serve 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.

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 ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

How to update this library

Example Workflow

  1. Write your component/service/directive in /projects/dc-med/src/lib, and remember to export it.
  2. Run ng build dc-med, then you get your lib in /dist
  3. Load your component/service/directive in a normal project (e.g. the project in /src, or any other your own project), test it and if it works well, run 'ng build dc-med --prod', update the 'version' in the package.json of dc-med project, then, cd into the root directory of dc-med prjection, (remember to login in npm first) and run npm publish
  4. Then you can npm i and use the new library anywhere else as you test it.

Note

  1. You'd better generate a new component/service/directive/module with angular-cli (my @angular/cli version is 6.0.8)
  2. Please follow the coding style for the tslint in the project (most values are default)
  3. Everytime you try to pulish a new version of the library, you need to update the version number first.

Reference

stories create library, please refer to angular cli official wiki https://github.com/angular/angular-cli/wiki/stories-create-library and a blog https://medium.com/@tomsu/how-to-build-a-library-for-angular-apps-4f9b38b0ed11

how to login in npm and publish a library of a new version, please refer to https://docs.npmjs.com/getting-started/publishing-npm-packages (You can use my npm account: wemakefocus/xlwh.3342150)

Future work

To add multi basic components from angular material 6

To add services and directives

To add necessary end-to-end test for each component/service/directive

To add high level components

To start and update a formal document