n-sheet v1.0.1
NSheet
This library was generated with Angular CLI version 7.2.0. Created using the example provided here.
Development
- Create an Angular App via the CLI using
ng new appname
. - In the CLI execute
ng generate library n-sheet
to create a library inside an Angular App. A library called n-sheet will now be created inside the projects folder (which will be created for you if it did not already exist). - Now copy and overwrite the contents of this repo into the n-sheet folder that resides within the projects folder.
- Build the library using the commands mentioned in the Build section.
- Then import the following using
import { NSheetDirective } from 'n-sheet';
&import { HttpClientModule } from '@angular/common/http';
into your app.module.ts. - In the app.module.ts file within th
@NgModule
tag addNSheetDirective
to your declarations and exports and addHttpClientModule
to your imports. You should now be able to use the directive in your app.component.ts and .html files to test and develop.
Code scaffolding
Run ng generate component component-name --project n-sheet
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project n-sheet
.
Note: Don't forget to add
--project n-sheet
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build n-sheet
to build the project. The build artifacts will be stored in the dist/
directory. Use ng build n-sheet --watch
while developing a library to always have the latest build on run.
Publishing
After building your library with ng build n-sheet
, go to the dist folder cd dist/n-sheet
and run npm publish
.
Running unit tests
Run ng test n-sheet
to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.