hexo-adsense 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-adsense",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Hexo adsense support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,23 +21,21 @@
21
21
  "scripts": {
22
22
  "lint": "eslint --ext .js,.jsx,.ts,.d.ts,.tsx ./",
23
23
  "lint:fix": "eslint --fix --ext .js,.jsx,.ts,.d.ts,.tsx ./",
24
- "build": "tsc -b tsconfig.build.json && rollup -c && gulp",
25
- "clean": "rimraf -rf dist tmp && npm run build",
24
+ "build-dts": "tsc -p tsconfig.build.json --emitDeclarationOnly --outDir dist",
25
+ "build-tsc": "tsc -b tsconfig.build.json",
26
+ "build": "rollup -c -m && npm run build-dts && gulp",
27
+ "clean": "npx -y rimraf -rf dist tmp && npm run build",
26
28
  "update": "npx npm-check-updates -u -x hexo,chalk",
27
29
  "patch": "npm version patch",
28
30
  "minor": "npm version minor",
29
31
  "major": "npm version major",
30
32
  "prepare": "husky",
31
- "prepack": "node package-switch.cjs production",
32
33
  "pack": "node packer.cjs --yarn",
33
34
  "clone:docs": "git clone https://github.com/dimaslanjaka/docs.git .deploy_git"
34
35
  },
35
36
  "files": [
36
37
  "dist/"
37
38
  ],
38
- "workspaces": [
39
- "test/demo"
40
- ],
41
39
  "keywords": [
42
40
  "hexo",
43
41
  "auto",
@@ -55,101 +53,104 @@
55
53
  "dependencies": {
56
54
  "ansi-colors": "^4.1.3",
57
55
  "bluebird": "^3.7.2",
58
- "fs-extra": "^11.2.0",
59
- "glob": "^11.0.0",
60
- "hexo-fs": "^4.1.3",
61
- "hexo-is": "^2.0.1",
56
+ "fs-extra": "^11.3.3",
57
+ "glob": "^13.0.3",
58
+ "hexo-fs": "^5.0.1",
59
+ "hexo-is": "^2.0.2",
62
60
  "hexo-log": "^4.1.0",
63
- "hexo-util": "^3.3.0",
64
- "jsdom": "^25.0.1",
65
- "lodash": "^4.17.21",
66
- "minimatch": "^10.0.1",
61
+ "jsdom": "^28.0.0",
62
+ "lodash": "^4.17.23",
63
+ "minimatch": "^10.2.0",
67
64
  "minimist": "^1.2.8",
68
65
  "moment": "^2.30.1",
69
- "node-html-parser": "^6.1.13",
66
+ "node-html-parser": "^7.0.2",
70
67
  "object-assign": "^4.1.1",
71
- "prettier": "^3.3.3",
72
- "sbg-utility": "^2.0.5",
73
- "terser": "^5.36.0",
68
+ "prettier": "^3.8.1",
69
+ "sbg-utility": "^2.0.11",
70
+ "terser": "^5.46.0",
74
71
  "underscore": "^1.13.7"
75
72
  },
76
73
  "devDependencies": {
77
- "@babel/core": "^7.26.0",
78
- "@babel/preset-env": "^7.26.0",
79
- "@babel/preset-typescript": "^7.26.0",
80
- "@eslint/eslintrc": "^3.1.0",
81
- "@eslint/js": "^9.13.0",
82
- "@rollup/plugin-babel": "^6.0.4",
83
- "@rollup/plugin-commonjs": "^28.0.1",
74
+ "@babel/core": "^7.29.0",
75
+ "@babel/preset-env": "^7.29.0",
76
+ "@babel/preset-typescript": "^7.28.5",
77
+ "@eslint/eslintrc": "^3.3.3",
78
+ "@eslint/js": "^10.0.1",
79
+ "@rollup/plugin-babel": "^6.1.0",
80
+ "@rollup/plugin-commonjs": "^29.0.0",
84
81
  "@rollup/plugin-json": "^6.1.0",
85
- "@rollup/plugin-node-resolve": "^15.3.0",
86
- "@rollup/plugin-typescript": "^12.1.1",
82
+ "@rollup/plugin-node-resolve": "^16.0.3",
83
+ "@rollup/plugin-typescript": "^12.3.0",
87
84
  "@types/babel__core": "^7",
88
85
  "@types/babel__preset-env": "^7",
89
86
  "@types/bluebird": "^3",
87
+ "@types/connect": "^3.4.38",
90
88
  "@types/fs-extra": "^11",
91
- "@types/gulp": "^4.0.17",
89
+ "@types/gulp": "^4.0.18",
92
90
  "@types/gulp-sourcemaps": "^0.0.38",
93
- "@types/jsdom": "^21.1.7",
91
+ "@types/hexo": "^7.0.0",
92
+ "@types/jsdom": "^27.0.0",
94
93
  "@types/lodash": "^4",
95
94
  "@types/minimist": "^1",
96
- "@types/node": "^22.8.1",
95
+ "@types/node": "^25.2.3",
97
96
  "@types/object-assign": "^4",
97
+ "@types/through2": "https://github.com/dimaslanjaka/nodejs-package-types/raw/through2/release/types-through2.tgz",
98
98
  "@types/underscore": "^1",
99
- "@typescript-eslint/eslint-plugin": "^8.11.0",
100
- "@typescript-eslint/parser": "^8.11.0",
101
- "cross-spawn": "^7.0.3",
102
- "eslint": "^9.13.0",
103
- "eslint-config-prettier": "^9.1.0",
104
- "eslint-plugin-import": "^2.31.0",
105
- "eslint-plugin-prettier": "^5.2.1",
106
- "git-command-helper": "^2.0.2",
107
- "globals": "^15.11.0",
108
- "gulp": "^5.0.0",
109
- "gulp-autoprefixer": "^9.0.0",
99
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
100
+ "@typescript-eslint/parser": "^8.55.0",
101
+ "binary-collections": "^2.0.10",
102
+ "browserify": "^17.0.1",
103
+ "cross-spawn": "^7.0.6",
104
+ "eslint": "^10.0.0",
105
+ "eslint-config-prettier": "^10.1.8",
106
+ "eslint-plugin-import": "^2.32.0",
107
+ "eslint-plugin-prettier": "^5.5.5",
108
+ "git-command-helper": "^2.1.0",
109
+ "globals": "^17.3.0",
110
+ "gulp": "^5.0.1",
111
+ "gulp-autoprefixer": "^10.0.0",
110
112
  "gulp-clean-css": "^4.3.0",
111
113
  "gulp-html-minifier-terser": "^7.1.0",
112
114
  "gulp-sourcemaps": "^3.0.0",
113
115
  "gulp-terser": "^2.1.0",
114
- "hexo": "^7.3.0",
115
116
  "hexo-server": "^3.0.0",
116
- "husky": "^9.1.6",
117
- "lint-staged": "^15.2.10",
118
- "nodemon": "^3.1.7",
119
- "rimraf": "^6.0.1",
120
- "rollup": "4.24.0",
121
- "rollup-plugin-dts": "^6.1.1",
117
+ "husky": "^9.1.7",
118
+ "lint-staged": "^16.2.7",
119
+ "nodemon": "^3.1.11",
120
+ "rimraf": "^6.1.2",
121
+ "rollup": "4.57.1",
122
+ "rollup-plugin-dts": "^6.3.0",
123
+ "through2": "^4.0.2",
122
124
  "ts-node": "^10.9.2",
123
- "typescript": "^5.6.3"
125
+ "typescript": "^5.9.3"
124
126
  },
125
127
  "packageManager": "yarn@4.5.1",
126
128
  "resolutions": {
127
- "@types/git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/pre-release/release/git-command-helper.tgz",
128
- "@types/hexo": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo.tgz",
129
- "binary-collections": "https://github.com/dimaslanjaka/bin/raw/fcd1121/releases/bin.tgz",
130
- "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/private/release/cross-spawn.tgz",
131
- "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/pre-release/release/git-command-helper.tgz",
132
- "hexo": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo.tgz",
133
- "hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-asset-link.tgz",
134
- "hexo-cli": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-cli.tgz",
135
- "hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-front-matter.tgz",
136
- "hexo-generator-redirect": "https://github.com/dimaslanjaka/hexo-generator-redirect/raw/0885394/release/hexo-generator-redirect.tgz",
137
- "hexo-is": "https://github.com/dimaslanjaka/hexo-is/raw/master/release/hexo-is.tgz",
138
- "hexo-log": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-log.tgz",
139
- "hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/d9f3a9ba3585188dfb30159ff588b709f0238326/release/hexo-post-parser.tgz",
140
- "hexo-renderers": "https://github.com/dimaslanjaka/hexo-renderers/raw/0534154ea2bbc4a06fe347861e8ebfc7a722c10f/release/hexo-renderers.tgz",
141
- "hexo-seo": "https://github.com/dimaslanjaka/hexo-seo/raw/7729b4246934d7319c4bcacbbe01a3748b5f5056/release/hexo-seo.tgz",
142
- "hexo-server": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-server.tgz",
143
- "hexo-shortcodes": "https://github.com/dimaslanjaka/hexo-shortcodes/raw/f70a1c0/release/hexo-shortcodes.tgz",
144
- "hexo-util": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-util.tgz",
145
- "instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/master/packages/instant-indexing/release/instant-indexing.tgz",
146
- "markdown-it": "https://github.com/dimaslanjaka/markdown-it/raw/17ccc825cbb3e4c6d59edada5f6d93f27075d752/release/markdown-it.tgz",
147
- "nodejs-package-types": "https://github.com/dimaslanjaka/nodejs-package-types/raw/a2e797bc27975cba20ef4c87547841e6341bfcf4/release/nodejs-package-types.tgz",
148
- "sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/74a402210be05e3452a386f90b80521e1182a724/packages/sbg-api/release/sbg-api.tgz",
149
- "sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/0164b0d2e4ba5453890af8ec4863b2a09e043815/packages/sbg-cli/release/sbg-cli.tgz",
150
- "sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/master/packages/sbg-server/release/sbg-server.tgz",
151
- "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/c7e82cae850b9fd6c1829ff6d30ef3ee8987019b/packages/sbg-utility/release/sbg-utility.tgz",
152
- "static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/master/packages/static-blog-generator/release/static-blog-generator.tgz",
153
- "warehouse": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/warehouse.tgz"
129
+ "@types/git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/678044cf286b2bd122e3ee937852a739e804e0a5/release/git-command-helper.tgz",
130
+ "@types/hexo": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo.tgz",
131
+ "binary-collections": "https://github.com/dimaslanjaka/bin/raw/9d2f7ebf4c37cf1d58487951c9e2ad3a20b917c1/releases/bin.tgz",
132
+ "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/80999ac7a7031a81e11ddb5fab0f8ba433041c98/release/cross-spawn.tgz",
133
+ "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/678044cf286b2bd122e3ee937852a739e804e0a5/release/git-command-helper.tgz",
134
+ "hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-asset-link.tgz",
135
+ "hexo-cli": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-cli.tgz",
136
+ "hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-front-matter.tgz",
137
+ "hexo-generator-redirect": "https://github.com/dimaslanjaka/hexo-generator-redirect/raw/a2e390c496954e7883218b9b82a09972c7507c10/release/hexo-generator-redirect.tgz",
138
+ "hexo-is": "https://github.com/dimaslanjaka/hexo-is/raw/52cbd2efd2c134fae5033ea0bf6f3fd8160abd6e/release/hexo-is.tgz",
139
+ "hexo-log": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-log.tgz",
140
+ "hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/f7b82f38fe28e4d42a504971eadd27e517e26f13/release/hexo-post-parser.tgz",
141
+ "hexo-renderers": "https://github.com/dimaslanjaka/hexo-renderers/raw/b1bcde457c2c60a73f567e00bbf5157b919cec45/release/hexo-renderers.tgz",
142
+ "hexo-seo": "https://github.com/dimaslanjaka/hexo-seo/raw/21e024b84538853c8b8521140530694d92d64b74/release/hexo-seo.tgz",
143
+ "hexo-server": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-server.tgz",
144
+ "hexo-shortcodes": "https://github.com/dimaslanjaka/hexo-shortcodes/raw/2ed1250d701369b8235a02b9af834bbfc62644a0/release/hexo-shortcodes.tgz",
145
+ "hexo-util": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-util.tgz",
146
+ "instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/f221d11cdc32fa7dd001e5236f8c3f30387e62d2/packages/instant-indexing/release/instant-indexing.tgz",
147
+ "markdown-it": "https://github.com/dimaslanjaka/markdown-it/raw/7f4f9d5ec08ebcfde42affb517ea7c8e6a305534/release/markdown-it.tgz",
148
+ "nodejs-package-types": "https://github.com/dimaslanjaka/nodejs-package-types/raw/5f18f2e8c4d8230f71f3f327ac14756d7eeae9ce/release/nodejs-package-types.tgz",
149
+ "sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/95400dd87106542a640092fa2073ee7d5c9b83e6/packages/sbg-api/release/sbg-api.tgz",
150
+ "sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/8c0f903cb1643add882c32d7a2180d2b99e1154f/packages/sbg-cli/release/sbg-cli.tgz",
151
+ "sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/8c0f903cb1643add882c32d7a2180d2b99e1154f/packages/sbg-server/release/sbg-server.tgz",
152
+ "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/3f36c7384fa414d0207460e00c0d7d362dba995f/packages/sbg-utility/release/sbg-utility.tgz",
153
+ "static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/8c0f903cb1643add882c32d7a2180d2b99e1154f/packages/static-blog-generator/release/static-blog-generator.tgz",
154
+ "warehouse": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/warehouse.tgz"
154
155
  }
155
156
  }
package/readme.md CHANGED
@@ -52,7 +52,9 @@ adsense:
52
52
  ```
53
53
 
54
54
  ### Article Ads
55
+
55
56
  > include to config article_ads
57
+
56
58
  ```yaml
57
59
  adsense:
58
60
  article_ads:
@@ -115,6 +117,20 @@ tags:
115
117
  - tags2
116
118
  ```
117
119
 
120
+ ## Prioritize ads fill on spesific element
121
+
122
+ You can adjust where the ads should be visible by using `<div hexo-adsense-fill=""></div>` everywhere. [[Reference](https://github.com/dimaslanjaka/hexo-adsense/blob/27634e629ce3360eac9b31a7724e7d193aaab1f3/source/article-ads.js#L83)]
123
+
124
+ You also can adjust with independent ads (_dont use same adsense ads id_).
125
+
126
+ ```html
127
+ <div hexo-adsense-fill="" style="display:block" data-ad-client="ca-pub-1048456668116270" data-ad-slot="5659161378" data-ad-format="auto" data-full-width-responsive="true"></div>
128
+ <!-- or you can remove ad-client and style attribute -->
129
+ <div hexo-adsense-fill="" data-ad-slot="5659161378" data-ad-format="auto" data-full-width-responsive="true"></div>
130
+ ```
131
+
132
+ Above codes will converted into adsense ads automatically.
133
+
118
134
  ## Footnote
119
135
  first development finished on 12 November 2021
120
136
 
package/dist/index.d.cts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/index.d.mts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }