@ampless/plugin-plausible 0.1.1-alpha.0
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/LICENSE +21 -0
- package/README.ja.md +97 -0
- package/README.md +97 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +85 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ampless contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
> English: [README.md](./README.md)
|
|
2
|
+
>
|
|
3
|
+
|
|
4
|
+
# @ampless/plugin-plausible
|
|
5
|
+
|
|
6
|
+
[ampless](https://github.com/heavymoons/ampless) 向け [Plausible Analytics](https://plausible.io/) プラグイン。
|
|
7
|
+
|
|
8
|
+
> **プレリリース / アルファ版。** v1.0 まではマイナーバージョンでも破壊的変更が入る可能性があります。
|
|
9
|
+
|
|
10
|
+
descriptor ベースのプラグイン head 注入 API を使って、公開ページに Plausible 標準の `<script>` スニペットを挿入します。Plausible はプライバシー重視・cookie 不使用の解析サービスで、多くの導入で cookie 同意バナーは不要です。
|
|
11
|
+
|
|
12
|
+
サイトドメインとスクリプト URL はどちらもデプロイ後 **`/admin/plugins` から編集可能** で、`cms.config.ts` の constructor 引数は初期デフォルトのシードに過ぎません。AWS のデータ権限は不要で、`trust_level` は `untrusted`、公開 Next.js プロセス内で描画時に動きます。
|
|
13
|
+
|
|
14
|
+
## インストール
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @ampless/plugin-plausible@alpha
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 設定
|
|
21
|
+
|
|
22
|
+
`cms.config.ts` に記述します:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { defineConfig } from 'ampless'
|
|
26
|
+
import plausiblePlugin from '@ampless/plugin-plausible'
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
// ...
|
|
30
|
+
plugins: [
|
|
31
|
+
plausiblePlugin({
|
|
32
|
+
// 初期サイトドメイン(Plausible 管理画面に登録した値と一致させる)。
|
|
33
|
+
// デプロイ後は /admin/plugins から編集可能。
|
|
34
|
+
// 空文字でプラグインを無効化したまま ship できる。
|
|
35
|
+
domain: '',
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
})
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
| オプション | デフォルト | 備考 |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `domain` | `''` | 初期 Plausible サイトドメイン。例: `example.com`。Plausible 管理画面に登録した値と完全一致させる必要がある — ミスマッチだとページビューが silently drop される。空文字でプラグインを無効化したまま ship できる。 |
|
|
44
|
+
| `scriptUrl` | `'https://plausible.io/js/script.js'` | Plausible スクリプトの URL。self-hosted Plausible を使う場合に上書き(例: `'https://analytics.example.com/js/script.js'`)。admin field は **required** なので値を消すことはできない。plausible.io デフォルトに戻すには admin form の **デフォルトに戻す** を使う。 |
|
|
45
|
+
| `instanceId` | `'plausible'` | script 要素 id と設定保存キーの namespace。同サイトに複数の Plausible site を入れる場合に分ける。 |
|
|
46
|
+
|
|
47
|
+
## 管理画面から設定を編集する
|
|
48
|
+
|
|
49
|
+
デプロイ後、両 field は `/admin/plugins` → **Plausible Analytics** で編集できます。
|
|
50
|
+
|
|
51
|
+
- **サイトドメイン** — 空文字保存で `cms.config.ts` から削除せずに無効化、`example.com` を保存すれば有効化されます
|
|
52
|
+
- **スクリプト URL** — 必須、デフォルトは `https://plausible.io/js/script.js`。self-hosted Plausible に向けたいときに上書き。`required: true` なので値を消すことはできず、plausible.io デフォルトに戻すには admin form の **デフォルトに戻す** を使ってください
|
|
53
|
+
|
|
54
|
+
変更内容は site-settings の S3 ミラーが反映された後(数秒)に公開サイトに反映されます。
|
|
55
|
+
|
|
56
|
+
## Plausible にドメインを登録する
|
|
57
|
+
|
|
58
|
+
1. [Plausible ダッシュボード](https://plausible.io/sites)(または self-hosted Plausible インスタンス)にサインインします。
|
|
59
|
+
2. **Add site** で、ここで設定するのと同じドメインを入力します — 例: `example.com`。Plausible は受信イベントを「登録済みドメイン文字列」で照合するので、admin form の値とダッシュボードの値は文字単位で一致させる必要があります。
|
|
60
|
+
3. ドメインを上の `domain` に設定するか、admin form に貼り付けます。
|
|
61
|
+
|
|
62
|
+
ドメイン文字列はサイト識別子であって書き込み認証には使われないため、ソースコードにコミットして問題ありません。
|
|
63
|
+
|
|
64
|
+
## self-hosted Plausible
|
|
65
|
+
|
|
66
|
+
[Plausible Community Edition](https://github.com/plausible/community-edition) は自前インフラ上にホストできる self-hosted 版です。このプラグインから self-hosted インスタンスを使うには、admin form(または初期 default として `cms.config.ts`)で `scriptUrl` を上書きします:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
plausiblePlugin({
|
|
70
|
+
domain: 'example.com',
|
|
71
|
+
scriptUrl: 'https://analytics.example.com/js/script.js',
|
|
72
|
+
})
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
plausible.io デフォルトに戻すには admin form の **デフォルトに戻す** をクリックしてください — 保存済み DDB 行が削除され、次のリクエストから manifest default に fallback します。
|
|
76
|
+
|
|
77
|
+
## 複数インスタンス
|
|
78
|
+
|
|
79
|
+
各 `plausiblePlugin(...)` 呼び出しは描画 DOM と admin 設定保存の両方で独立した `instanceId` namespace を持ちます:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
plugins: [
|
|
83
|
+
plausiblePlugin({ instanceId: 'marketing', domain: 'marketing.example.com' }),
|
|
84
|
+
plausiblePlugin({ instanceId: 'product', domain: 'app.example.com' }),
|
|
85
|
+
]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
admin form では各 instance が個別パネルとして表示されます。
|
|
89
|
+
|
|
90
|
+
## トラストレベル
|
|
91
|
+
|
|
92
|
+
`untrusted`。プラグインは `@ampless/runtime` が検証・描画する head descriptor を返すだけです。DynamoDB、S3、Lambda プロセッサーには一切触れません。
|
|
93
|
+
|
|
94
|
+
## まだやらないこと
|
|
95
|
+
|
|
96
|
+
- **CSP nonce 連携** — script descriptor は `nonce` 無しで emit されます。ampless サイトに CSP enforcement を入れる段で別 RFP として middleware → SSR → descriptor の通り道を設計します
|
|
97
|
+
- **Plausible custom event** — ローダーを注入するだけです。custom event はページコード側で標準 Plausible API (`window.plausible(...)`) を呼んでください
|
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
|
|
4
|
+
# @ampless/plugin-plausible
|
|
5
|
+
|
|
6
|
+
[Plausible Analytics](https://plausible.io/) plugin for [ampless](https://github.com/heavymoons/ampless).
|
|
7
|
+
|
|
8
|
+
> **Pre-release / alpha.** Breaking changes possible in any minor version until v1.0.
|
|
9
|
+
|
|
10
|
+
Drops the standard Plausible `<script>` snippet onto every public page through the descriptor-based plugin head injection API. Plausible is a privacy-focused, cookie-free analytics service — most deployments don't need a cookie-consent banner to use it.
|
|
11
|
+
|
|
12
|
+
The site domain and the script URL are both **editable from `/admin/plugins`** after deploy. The constructor arguments in `cms.config.ts` just seed the initial defaults. No AWS data permissions are required; the plugin's `trust_level` is `untrusted` and everything runs at request time inside the public Next.js process.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @ampless/plugin-plausible@alpha
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Configure
|
|
21
|
+
|
|
22
|
+
In `cms.config.ts`:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { defineConfig } from 'ampless'
|
|
26
|
+
import plausiblePlugin from '@ampless/plugin-plausible'
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
// ...
|
|
30
|
+
plugins: [
|
|
31
|
+
plausiblePlugin({
|
|
32
|
+
// Initial site domain (matches what's registered in Plausible).
|
|
33
|
+
// Editable from /admin/plugins after deploy. Leave empty to ship
|
|
34
|
+
// the plugin disabled and turn it on later.
|
|
35
|
+
domain: '',
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
})
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
| Option | Default | Notes |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `domain` | `''` | Initial Plausible site domain, e.g. `example.com`. Must match the value registered in the Plausible dashboard exactly — a mismatch silently drops every pageview. Set to `''` to ship the plugin disabled. |
|
|
44
|
+
| `scriptUrl` | `'https://plausible.io/js/script.js'` | URL of the Plausible script. Override for self-hosted Plausible (e.g. `'https://analytics.example.com/js/script.js'`). The admin field is **required**, so the value can't be cleared — to switch back to the hosted plausible.io URL, use **Reset to default** in the admin form. |
|
|
45
|
+
| `instanceId` | `'plausible'` | Namespace used for the script element id and settings storage key. Set distinct values when registering multiple Plausible sites on the same deployment. |
|
|
46
|
+
|
|
47
|
+
## Editing settings from the admin UI
|
|
48
|
+
|
|
49
|
+
After a deploy, both fields live at `/admin/plugins` → **Plausible Analytics**.
|
|
50
|
+
|
|
51
|
+
- **Site domain** — saving an empty value disables the plugin without removing it from `cms.config.ts`; saving `example.com` enables it.
|
|
52
|
+
- **Script URL** — required, defaults to `https://plausible.io/js/script.js`. Override to point at a self-hosted Plausible install. The field cannot be cleared (`required: true`); use **Reset to default** in the admin form to switch back to the hosted plausible.io URL.
|
|
53
|
+
|
|
54
|
+
Changes are reflected on the public site after the site-settings S3 mirror finishes (a few seconds).
|
|
55
|
+
|
|
56
|
+
## Registering your domain with Plausible
|
|
57
|
+
|
|
58
|
+
1. Sign in to your [Plausible dashboard](https://plausible.io/sites) (or your self-hosted Plausible instance).
|
|
59
|
+
2. **Add site** and enter the same domain you'll configure here — e.g. `example.com`. Plausible matches on the exact registered string when ingesting events, so the value in the admin form must match the dashboard value character-for-character.
|
|
60
|
+
3. Copy the domain into the `domain` option above, or paste it into the admin form.
|
|
61
|
+
|
|
62
|
+
The domain string is safe to commit to source control — it's just the site identifier and doesn't authenticate writes.
|
|
63
|
+
|
|
64
|
+
## Self-hosted Plausible
|
|
65
|
+
|
|
66
|
+
[Plausible Community Edition](https://github.com/plausible/community-edition) self-hosts on your own infrastructure. To point this plugin at a self-hosted instance, override `scriptUrl` from the admin form (or from `cms.config.ts` for the initial default):
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
plausiblePlugin({
|
|
70
|
+
domain: 'example.com',
|
|
71
|
+
scriptUrl: 'https://analytics.example.com/js/script.js',
|
|
72
|
+
})
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
To revert to the hosted plausible.io URL, click **Reset to default** in the admin form — that deletes the stored DDB row so the next request falls back to the manifest default.
|
|
76
|
+
|
|
77
|
+
## Multiple instances
|
|
78
|
+
|
|
79
|
+
Each `plausiblePlugin(...)` call gets its own `instanceId` namespace, both in the rendered DOM and in the admin settings storage:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
plugins: [
|
|
83
|
+
plausiblePlugin({ instanceId: 'marketing', domain: 'marketing.example.com' }),
|
|
84
|
+
plausiblePlugin({ instanceId: 'product', domain: 'app.example.com' }),
|
|
85
|
+
]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The admin form lists each instance as its own panel.
|
|
89
|
+
|
|
90
|
+
## Trust level
|
|
91
|
+
|
|
92
|
+
`untrusted`. The plugin only contributes a head descriptor that is validated and rendered by `@ampless/runtime`. It does not touch DynamoDB, S3, or any Lambda processor.
|
|
93
|
+
|
|
94
|
+
## What it does not do
|
|
95
|
+
|
|
96
|
+
- **CSP nonce propagation** — the script descriptor is emitted without a `nonce`. ampless sites don't enforce a CSP today; once that lands, a dedicated RFP will wire `nonce` end-to-end (middleware → SSR → descriptor).
|
|
97
|
+
- **Plausible custom events** — the loader is injected; custom events fire from your own page code via the standard Plausible `window.plausible(...)` API.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AmplessPlugin } from 'ampless';
|
|
2
|
+
|
|
3
|
+
interface PlausibleOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The Plausible site domain (e.g. `'example.com'`). Must match the
|
|
6
|
+
* value registered in the Plausible dashboard exactly — Plausible
|
|
7
|
+
* uses the string as the row key when ingesting events, so a
|
|
8
|
+
* mismatch silently drops every pageview.
|
|
9
|
+
*
|
|
10
|
+
* Constructor argument seeds the manifest `default`. Empty string
|
|
11
|
+
* disables the plugin (descriptor returns `[]`) — handy for staging
|
|
12
|
+
* or for keeping the dependency wired up before the dashboard is
|
|
13
|
+
* provisioned. New deployments should leave it empty and configure
|
|
14
|
+
* the value from `/admin/plugins`.
|
|
15
|
+
*/
|
|
16
|
+
domain?: string;
|
|
17
|
+
/**
|
|
18
|
+
* URL of the Plausible script. Defaults to
|
|
19
|
+
* `https://plausible.io/js/script.js` (the hosted version). Override
|
|
20
|
+
* for self-hosted Plausible (e.g.
|
|
21
|
+
* `'https://analytics.example.com/js/script.js'`).
|
|
22
|
+
*
|
|
23
|
+
* The manifest field is `required: true` so admins cannot save an
|
|
24
|
+
* empty value — an empty `src` attribute would silently drop the
|
|
25
|
+
* loader. To switch back to the hosted plausible.io URL after a
|
|
26
|
+
* self-hosted override, use "Reset to default" in the admin form.
|
|
27
|
+
*/
|
|
28
|
+
scriptUrl?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional namespace for this instance. Defaults to `'plausible'`.
|
|
31
|
+
* Set distinct values when registering the plugin twice (e.g. one
|
|
32
|
+
* marketing-site domain + one product-site domain on the same
|
|
33
|
+
* deployment).
|
|
34
|
+
*/
|
|
35
|
+
instanceId?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Factory for the Plausible plugin. Emits a single `<script>`
|
|
39
|
+
* descriptor with `data-domain` set to the configured domain. The
|
|
40
|
+
* plugin is `untrusted` — everything runs in the public Next.js
|
|
41
|
+
* process; no AWS data permissions needed.
|
|
42
|
+
*
|
|
43
|
+
* Both settings are read at request time through `ctx.setting()`,
|
|
44
|
+
* with constructor arguments seeding the manifest defaults.
|
|
45
|
+
*/
|
|
46
|
+
declare function plausiblePlugin(options?: PlausibleOptions): AmplessPlugin;
|
|
47
|
+
|
|
48
|
+
export { type PlausibleOptions, plausiblePlugin as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { definePlugin } from "ampless";
|
|
3
|
+
var DEFAULT_SCRIPT_URL = "https://plausible.io/js/script.js";
|
|
4
|
+
function plausiblePlugin(options = {}) {
|
|
5
|
+
const {
|
|
6
|
+
domain = "",
|
|
7
|
+
scriptUrl = DEFAULT_SCRIPT_URL,
|
|
8
|
+
instanceId = "plausible"
|
|
9
|
+
} = options;
|
|
10
|
+
return definePlugin({
|
|
11
|
+
name: "plausible",
|
|
12
|
+
instanceId,
|
|
13
|
+
displayName: { en: "Plausible Analytics", ja: "Plausible Analytics" },
|
|
14
|
+
apiVersion: 1,
|
|
15
|
+
trust_level: "untrusted",
|
|
16
|
+
capabilities: ["publicHead", "adminSettings"],
|
|
17
|
+
settings: {
|
|
18
|
+
public: [
|
|
19
|
+
{
|
|
20
|
+
type: "text",
|
|
21
|
+
key: "domain",
|
|
22
|
+
label: {
|
|
23
|
+
en: "Site domain",
|
|
24
|
+
ja: "\u30B5\u30A4\u30C8\u30C9\u30E1\u30A4\u30F3"
|
|
25
|
+
},
|
|
26
|
+
description: {
|
|
27
|
+
en: "The domain registered in Plausible (e.g. example.com). Leave blank to disable the plugin without removing it from cms.config.",
|
|
28
|
+
ja: "Plausible \u7BA1\u7406\u753B\u9762\u3067\u767B\u9332\u3057\u305F\u30C9\u30E1\u30A4\u30F3 (\u4F8B: example.com)\u3002\u7A7A\u306B\u3059\u308B\u3068 cms.config \u304B\u3089\u524A\u9664\u305B\u305A\u306B\u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u7121\u52B9\u5316\u3067\u304D\u307E\u3059\u3002"
|
|
29
|
+
},
|
|
30
|
+
// Accept either empty (disable) or a hostname-like string.
|
|
31
|
+
// Plausible matches on the exact registered domain, so this
|
|
32
|
+
// pattern is mostly a "did you paste in a URL by accident"
|
|
33
|
+
// guard rather than a strict FQDN validator.
|
|
34
|
+
pattern: "^$|^[a-zA-Z0-9.-]+$",
|
|
35
|
+
placeholder: "example.com",
|
|
36
|
+
default: domain
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: "url",
|
|
40
|
+
key: "scriptUrl",
|
|
41
|
+
label: {
|
|
42
|
+
en: "Script URL",
|
|
43
|
+
ja: "\u30B9\u30AF\u30EA\u30D7\u30C8 URL"
|
|
44
|
+
},
|
|
45
|
+
description: {
|
|
46
|
+
en: "URL of the Plausible script. Defaults to plausible.io; override for self-hosted Plausible.",
|
|
47
|
+
ja: "Plausible \u30B9\u30AF\u30EA\u30D7\u30C8\u306E URL\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F plausible.io\u3002self-hosted Plausible \u3092\u4F7F\u3046\u5834\u5408\u306B\u4E0A\u66F8\u304D\u3002"
|
|
48
|
+
},
|
|
49
|
+
// required + non-empty default keeps admins from saving
|
|
50
|
+
// src='' and breaking analytics silently. To switch from a
|
|
51
|
+
// self-hosted URL back to plausible.io, the admin uses
|
|
52
|
+
// "Reset to default" (which deletes the DDB row and lets
|
|
53
|
+
// the resolver fall back to this manifest default).
|
|
54
|
+
required: true,
|
|
55
|
+
allowRelative: false,
|
|
56
|
+
placeholder: DEFAULT_SCRIPT_URL,
|
|
57
|
+
default: scriptUrl
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
publicHead(ctx) {
|
|
62
|
+
const resolvedDomain = (ctx.setting("domain") ?? "").trim();
|
|
63
|
+
const resolvedScriptUrl = (ctx.setting("scriptUrl") ?? "").trim();
|
|
64
|
+
if (!resolvedDomain || !resolvedScriptUrl) return [];
|
|
65
|
+
return [
|
|
66
|
+
{
|
|
67
|
+
type: "script",
|
|
68
|
+
id: `plausible-${instanceId}`,
|
|
69
|
+
src: resolvedScriptUrl,
|
|
70
|
+
// `lazyOnload` keeps analytics off the critical hydration
|
|
71
|
+
// path. The descriptor renderer's `lazyOnload` mapping
|
|
72
|
+
// adds `defer`; we set `defer: true` explicitly too so the
|
|
73
|
+
// intent is clear and so a future strategy change doesn't
|
|
74
|
+
// accidentally drop the defer behaviour.
|
|
75
|
+
strategy: "lazyOnload",
|
|
76
|
+
defer: true,
|
|
77
|
+
attrs: { "data-domain": resolvedDomain }
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
plausiblePlugin as default
|
|
85
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ampless/plugin-plausible",
|
|
3
|
+
"version": "0.1.1-alpha.0",
|
|
4
|
+
"description": "Plausible Analytics plugin for ampless",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/heavymoons/ampless.git",
|
|
23
|
+
"directory": "packages/plugin-plausible"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/heavymoons/ampless/tree/main/packages/plugin-plausible#readme",
|
|
26
|
+
"bugs": "https://github.com/heavymoons/ampless/issues",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"ampless": "1.0.0-alpha.18"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"ampless",
|
|
32
|
+
"plugin",
|
|
33
|
+
"plausible",
|
|
34
|
+
"analytics",
|
|
35
|
+
"privacy"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup",
|
|
39
|
+
"dev": "tsup --watch",
|
|
40
|
+
"lint": "tsc --noEmit",
|
|
41
|
+
"test": "vitest run --passWithNoTests"
|
|
42
|
+
}
|
|
43
|
+
}
|