beyond-plan-drawings-component
v0.0.1
Published
## Using this library - `npm install @sixense/beyond-plan-drawings-lib` - for projects using Angular < v9.0.0 install via `npm install @sixense/[email protected]` - install the missing peer dependencies (`fabric`, `@sixense/beyond-iqoa-share
Downloads
2
Readme
BeyondPlanDrawingsComponent
Using this library
npm install @sixense/beyond-plan-drawings-lib
- for projects using Angular < v9.0.0 install via
npm install @sixense/[email protected]
- install the missing peer dependencies (
fabric
,@sixense/beyond-iqoa-shared-ng
,@angular/common
... - import the library into your main module (a.k.a. AppModule), providing it your notification service
import {
BeyondPlanDrawingsLibModule,
PLAN_DRAWINGS_NOTIFICATION_TOKEN,
} from '@sixense/beyond-plan-drawings-lib';
@NgModule({
imports: [
...
BeyondPlanDrawingsLibModule.forRoot({
notificationProvider: {
provide: PLAN_DRAWINGS_NOTIFICATION_TOKEN,
useClass: NotificationService,
},
}),
...
],
})
export class AppModule {}
If you need to use the library link plans to entities and you want to use the library's hierarchy component, you need to import BpdwPlansModule to your module (providing it the getTreeDescendants function) and assign a route to BpdwPlansComponent this way:
@NgModule({
declarations: [...],
imports: [
RouterModule.forChild({
path: '',
component: BpdwPlansComponent,
}),
BpdwPlansModule.forRoot({
getTreeDescendants: {
provide: BPDW_TREE_DESCENDANTS_TOKEN,
useClass: YourTreeDescendantsService,
},
}),
],
})
export class YourModule {}
In order to ease this, your service should implements TreeDescendantsService.
Contributing to this library
Linking library for local tests
Run npm run link
. This creates two simlinks that will allows the tester to use the lib without the use of npm i. This has to be done only once. Then run npm run build
and npm run start
(or the shorter version npm run bs
) to see the lib in action.
Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Development server
After having built and linked the library, run ng serve
for a dev server. Navigate to http://localhost:4200/
. You will need to rebuild the library everytime you make changes on it.
Publishing the library to npm
If you have the rights to publish to the private npm repository (more information here), you should be able to publish the library by first building it then using the command 'npm run publish'.
Please remember to use Semantic Versioning when you publish a new version, as well as update the CHANGELOG file.
Commit template
In order to use the commit-template for your commits, please run this command:
git config commit.template ./.git-commit-template