open-index/open-npm huggingface dataset:
npm package: @rokswood-group/jsx-core
Description: ## JSX core
Latest version: 0.0.0

# Scaffold

## JSX core

### Introduction

### Supported Platforms

- Browser
- Node.js (Javascript/Typescript)

### Installation

1. NPM

```bash
$ npm i @rokswood-group/jsx-core
```

2. CDN

```html

```

### Usage & API

## Commands

DTS scaffolds your new library inside `/src`.

To run DTS, use:

```bash
npm start # or yarn start
```

This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.

To do a one-off build, use `npm run build` or `yarn build`.

To run tests, use `npm test` or `yarn test`.

## Custom Commands

```
# build and sync locally
$ node ./build --env=dev --sync=true

# build and publish
$ node ./build --env=prod --sync=true --version=x.x.x
```

## Publish

```
$ git tag <version e.g v0.0.0>
$ git push origin <version>
```

## License
npm package: @rokt/ng-web-sdk
Description: ## Installation
Latest version: 1.0.0
Deprecated: This package is deprecated and no longer supported. Please contact Rokt for integration support.

# Rokt Angular Web SDK Integration

## Installation 

```
npm install --save @rokt/ng-web-sdk
# yarn add @rokt/ng-web-sdk
```

### Root Modules

In the project's root module add the `forRoot()` to the listed imports.
Place your partner tag id in the configuration options.

```typescript
// ...
import { RoktLauncherModule } from '@rokt/ng-web-sdk';

@NgModule({
  // ...
  imports: [
    // ...
    RoktLauncherModule.forRoot({
      tagId: '<your_tag_id>',
    }),
  ], 
})
export class AppModule { }
```

### Children Modules

If the project has children modules, add the `forChild()` to the listed imports:

```typescript
// ...
import { RoktLauncherModule } from '@rokt/ng-web-sdk';

@NgModule({
  // ...
  imports: [
    // ...
    RoktLauncherModule.forChild()
  ], 
})
export class AppChildModule { }

```

### Offer Page

On the page/route that must display a Rokt offer

```typescript
// ...
import { RoktLauncherService, Rokt } from '@rokt/ng-web-sdk';

@Component({
  selector: 'app-confirmation-page',
  template: /* html */`
    <div>Congratulations on your purchase!</div>
    <div id="rokt-placeholder"></div>
  `,
})
export class ConfirmationPageComponent {
  private _selection: Rokt.Selection

  constructor(
    private roktLauncherService: RoktLauncherService
  ) {}

  async ngAfterViewInit() {
    // Create a selection for this page, passing in relevant attributes. The method
    // will return a selection object that contains the placements for this page
    this._selection = await this.roktLauncherService.selectPlacements({
      attributes: {}
    })
    
    // Append the placements to the current page
    await this._selection.placements.placeAll()
  }

  async ngOnDestroy() {
    // Clear the placements from the current page, triggering a clean up of listeners
    // within the Rokt Web SDK singleton
    await this._selection.placements.removeAll()
  }
}
```