
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@boundstate/ng-docs
Advanced tools
Docs generator for Angular libraries.
$ npm i -D @boundstate/ng-docs @boundstate/ng-docs-cli
The following assumes you use Angular CLI to generate a library, and your workspace is setup like this:
├── projects/
│ └── my-lib/ (library)
├── src/ (app)
Use the CLI to generate docs for your library and write the output to your app.
Add this to your build scripts (e.g. package.json) so that it's run before ng serve and ng build commands:
ng-docs --base=projects/my-lib src/app/docs.ts
Modify your app to display the docs:
import {DocsModule} from '@boundstate/ng-docs';
import {docs} from './docs'; // generated docs
@Component({
selector: 'app-root',
template: `<ngd-app></ngd-app>`,
})
export class AppComponent {}
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
DocsModule.forRoot(docs),
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
export class AppModule {}
You can include demos in your app by creating demo modules and passing them to DocsModule.forRoot():
DocsModule.forRoot(docs, {demos: [
HelloWorldDemoModule,
]}),
Your demo modules must use the @Demo() decorator:
import {Component, NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {Demo} from '@boundstate/ng-docs';
import {MyLibModule} from 'my-lib';
@Component({template: '<app-hello-world color="purple"></app-hello-world>'})
export class HelloWorldDemoComponent {}
@Demo({
id: 'hello-world',
name: 'Hello World',
related: ['HelloWorldComponent'],
})
@NgModule({
imports: [
MyLibModule,
RouterModule.forChild([{path: '', component: HelloWorldDemoComponent}]),
],
declarations: [HelloWorldDemoComponent],
})
export class HelloWorldDemoModule {}
Workaround: disable AOT
$ npm run build:lib
$ npm start
FAQs
Docs generator for Angular libraries.
We found that @boundstate/ng-docs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.