Socket
Socket
Sign inDemoInstall

ng-gpt

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

bundles/ng-gpt.umd.js

23

package.json
{
"name": "ng-gpt",
"version": "0.0.2",
"version": "0.0.3",
"description": "A Angular implementation of the google GPT API.",
"keywords": [
"angular",
"doubleclick",
"google",
"ads",
"dfp",
"gpt",
"gam"
],
"license": "MIT",
"peerDependencies": {

@@ -11,3 +21,10 @@ "@angular/common": "^12.1.2",

"tslib": "^2.2.0"
}
}
},
"main": "bundles/ng-gpt.umd.js",
"module": "fesm2015/ng-gpt.js",
"es2015": "fesm2015/ng-gpt.js",
"esm2015": "esm2015/ng-gpt.js",
"fesm2015": "fesm2015/ng-gpt.js",
"typings": "ng-gpt.d.ts",
"sideEffects": false
}

70

README.md

@@ -1,64 +0,24 @@

# Angular GPT
# NgGpt
A Angular implementation of the google GPT API.
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.1.2.
## Installation:
## Code scaffolding
To install just run the following command (no other dependencies are required):
Run `ng generate component component-name --project ng-gpt` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-gpt`.
> Note: Don't forget to add `--project ng-gpt` or else it will be added to the default project in your `angular.json` file.
```bash
npm install --save ng-gpt
```
## Build
or
Run `ng build ng-gpt` to build the project. The build artifacts will be stored in the `dist/` directory.
```bash
yarn add ng-gpt
```
## Publishing
## Implementation
After building your library with `ng build ng-gpt`, go to the dist folder `cd dist/ng-gpt` and run `npm publish`.
```javascript
// app.module.ts
import { GptModule } from 'ng-gpt';
...
@NgModule({
declarations: [AppComponent],
imports: [
GptModule.forRoot({
idleLoad: true,
enableVideoAds: true,
personalizedAds: false,
singleRequestMode: false,
cookies: false,
ppid: '',
centering: true,
onSameNavigation: 'refresh',
globalTargeting: {
food: ['chicken', 'meatballs'],
},
enableLazyLoad: {
fetchMarginPercent: 500,
renderMarginPercent: 200,
mobileScaling: 2.0,
},
}),
],
providers: [],
bootstrap: [AppComponent],
})
```
## Running unit tests
```html
<gpt-ad
id="1625556673407-0"
adUnit="/35096353/pub-showcase"
[sizes]="[[728, 90]]"
[sizeMapping]="[
{ viewport: [1024, 768], sizes: [[728, 90],[300, 250]] },
{ viewport: [900, 768], sizes: [[300, 250],[210, 60]] }
]"
[targetingArguments]="{ categories: ['restaurantes', 'abogados'] }"
[collapseEmptyDivs]="true"
></gpt-ad>
```
Run `ng test ng-gpt` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc