Skip to content

Commit

Permalink
chore: update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
hoapn committed Nov 7, 2024
1 parent fc02f3f commit 40661ea
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 21 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:

strategy:
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
node: [18]

steps:
Expand All @@ -41,8 +40,3 @@ jobs:

- name: Test
run: yarn test

- name: Coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
> Google AdSense integration for Nuxt.js. Advertisements will update whenever the page route changes
## Setup
- Add `@nuxtjs/google-adsense` dependency using yarn or npm to your project
- Add `@nuxtjs/google-adsense` to `modules` section of `nuxt.config.js`
- Add `nuxt-google-adsense` dependency using yarn or npm to your project
- Add `nuxt-google-adsense` to `modules` section of `nuxt.config.js`

```js
{
modules: [
// Simple usage
['@nuxtjs/google-adsense', {
['nuxt-google-adsense', {
id: 'ca-pub-###########'
}]
]
Expand All @@ -33,7 +33,7 @@ Using top level options:
```js
{
modules: [
['@nuxtjs/google-adsense']
['nuxt-google-adsense']
],

googleAdsense: {
Expand All @@ -47,7 +47,7 @@ Using runtime config:
```js
{
modules: [
['@nuxtjs/google-adsense']
['nuxt-google-adsense']
],

googleAdsense: {
Expand Down Expand Up @@ -161,14 +161,14 @@ on the `<Adsbygoogle />` component.


<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/@nuxtjs/google-adsense/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/@nuxtjs/google-adsense
[npm-version-src]: https://img.shields.io/npm/v/nuxt-google-adsense/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/nuxt-google-adsense

[npm-downloads-src]: https://img.shields.io/npm/dm/@nuxtjs/google-adsense.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-google-adsense.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/google-adsene

[license-src]: https://img.shields.io/npm/l/@nuxtjs/google-adsense.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/@nuxtjs/google-adsense
[license-src]: https://img.shields.io/npm/l/nuxt-google-adsense.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/nuxt-google-adsense

[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "nuxt-google-adsense",
"version": "1.0.0",
"description": "Google AdSense Module for Nuxt3",
"repository": "https://github.com/techmely/nuxt-google-adsense",
"repository": {
"type": "git",
"url": "git+https://github.com/techmely/nuxt-google-adsense.git"
},
"license": "MIT",
"type": "module",
"exports": {
Expand Down Expand Up @@ -43,5 +46,16 @@
"eslint": "^9.14.0",
"nuxt": "^3.14.159",
"vitest": "^2.1.4"
}
},
"bugs": {
"url": "https://github.com/techmely/nuxt-google-adsense/issues"
},
"homepage": "https://github.com/techmely/nuxt-google-adsense#readme",
"directories": {
"test": "test"
},
"keywords": [
"nuxt-google-adsense"
],
"author": "techmely"
}
5 changes: 4 additions & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
export default defineNuxtConfig({
modules: ['../src/module'],

googleAdsense: {
id: 'test-me-id',
},

devtools: { enabled: true },
})
compatibilityDate: '2024-11-07',
})
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const TEST_ID = 'ca-google'

export default defineNuxtModule<ModuleOptions>({
meta: {
name: '@nuxtjs/google-adsense',
name: 'nuxt-google-adsense',
configKey: 'googleAdsense',
compatibility: {
nuxt: '^3.X.X',
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// https://v3.nuxtjs.org/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
}

0 comments on commit 40661ea

Please sign in to comment.