@vttforge/cli 0.0.0 → 0.5.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/CHANGELOG.md +350 -0
- package/LICENSE +21 -0
- package/README.md +33 -5
- package/dist/bin.d.mts +1 -0
- package/dist/bin.mjs +201 -0
- package/dist/bin.mjs.map +1 -0
- package/dist/index.d.mts +496 -0
- package/dist/index.mjs +2 -0
- package/dist/src-CWhUNM__.mjs +2443 -0
- package/dist/src-CWhUNM__.mjs.map +1 -0
- package/package.json +62 -9
- package/templates/module-js/.github/workflows/release.yml +92 -0
- package/templates/module-js/README.md +57 -0
- package/templates/module-js/_gitignore +12 -0
- package/templates/module-js/lang/en.json +11 -0
- package/templates/module-js/module.json +20 -0
- package/templates/module-js/package.json +24 -0
- package/templates/module-js/scripts/main.mjs +65 -0
- package/templates/module-js/styles/main.css +16 -0
- package/templates/module-js/vite.config.mjs +13 -0
- package/templates/module-ts/.github/workflows/release.yml +92 -0
- package/templates/module-ts/README.md +57 -0
- package/templates/module-ts/_gitignore +12 -0
- package/templates/module-ts/lang/en.json +11 -0
- package/templates/module-ts/module.json +20 -0
- package/templates/module-ts/package.json +26 -0
- package/templates/module-ts/scripts/foundry-globals.ts +23 -0
- package/templates/module-ts/scripts/main.ts +71 -0
- package/templates/module-ts/styles/main.css +16 -0
- package/templates/module-ts/tsconfig.json +18 -0
- package/templates/module-ts/vite.config.mjs +13 -0
- package/templates/system-js/.github/workflows/release.yml +92 -0
- package/templates/system-js/README.md +57 -0
- package/templates/system-js/_gitignore +12 -0
- package/templates/system-js/lang/en.json +55 -0
- package/templates/system-js/package.json +25 -0
- package/templates/system-js/scripts/data/character-data.mjs +79 -0
- package/templates/system-js/scripts/data/gear-data.mjs +37 -0
- package/templates/system-js/scripts/main.mjs +79 -0
- package/templates/system-js/scripts/migrations.mjs +43 -0
- package/templates/system-js/scripts/sheets/character-sheet.mjs +164 -0
- package/templates/system-js/scripts/sheets/gear-sheet.mjs +65 -0
- package/templates/system-js/styles/main.css +495 -0
- package/templates/system-js/system.json +44 -0
- package/templates/system-js/template.json +8 -0
- package/templates/system-js/templates/actor/character-sheet.hbs +168 -0
- package/templates/system-js/templates/item/gear-sheet.hbs +54 -0
- package/templates/system-js/vite.config.mjs +16 -0
- package/templates/system-ts/.github/workflows/release.yml +92 -0
- package/templates/system-ts/README.md +57 -0
- package/templates/system-ts/_gitignore +12 -0
- package/templates/system-ts/lang/en.json +55 -0
- package/templates/system-ts/package.json +27 -0
- package/templates/system-ts/scripts/data/character-data.ts +81 -0
- package/templates/system-ts/scripts/data/gear-data.ts +37 -0
- package/templates/system-ts/scripts/foundry-globals.ts +33 -0
- package/templates/system-ts/scripts/main.ts +82 -0
- package/templates/system-ts/scripts/migrations.ts +43 -0
- package/templates/system-ts/scripts/sheets/character-sheet.ts +202 -0
- package/templates/system-ts/scripts/sheets/gear-sheet.ts +68 -0
- package/templates/system-ts/styles/main.css +495 -0
- package/templates/system-ts/system.json +44 -0
- package/templates/system-ts/template.json +8 -0
- package/templates/system-ts/templates/actor/character-sheet.hbs +168 -0
- package/templates/system-ts/templates/item/gear-sheet.hbs +54 -0
- package/templates/system-ts/tsconfig.json +18 -0
- package/templates/system-ts/vite.config.mjs +16 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{{!-- Gear sheet — minimal demo of BaseItemSheet on ItemSheetV2. --}}
|
|
2
|
+
<form autocomplete="off">
|
|
3
|
+
|
|
4
|
+
<header class="sheet-header">
|
|
5
|
+
<img class="portrait" src="{{item.img}}" alt="{{item.name}}" data-edit="img" />
|
|
6
|
+
<input type="text" name="name" value="{{item.name}}"
|
|
7
|
+
placeholder="{{localize '{{LOCALE_PREFIX}}.Sheet.NamePlaceholder'}}" />
|
|
8
|
+
</header>
|
|
9
|
+
|
|
10
|
+
<nav class="sheet-tabs" data-group="primary">
|
|
11
|
+
{{#each tabs as |tab|}}
|
|
12
|
+
<button type="button" class="item {{tab.cssClass}}"
|
|
13
|
+
data-tab="{{tab.id}}"
|
|
14
|
+
data-group="primary"
|
|
15
|
+
data-action="vttforgeTab"
|
|
16
|
+
title="{{localize tab.label}}">
|
|
17
|
+
{{#if tab.icon}}<i class="{{tab.icon}}"></i>{{/if}}
|
|
18
|
+
<span>{{localize tab.label}}</span>
|
|
19
|
+
</button>
|
|
20
|
+
{{/each}}
|
|
21
|
+
</nav>
|
|
22
|
+
|
|
23
|
+
<section class="sheet-body">
|
|
24
|
+
{{!-- DETAILS --}}
|
|
25
|
+
<section class="tab details {{tabs.details.cssClass}}"
|
|
26
|
+
data-tab="details" data-group="primary">
|
|
27
|
+
<div class="field">
|
|
28
|
+
<label>{{localize "{{LOCALE_PREFIX}}.Gear.Quantity"}}</label>
|
|
29
|
+
<input type="number" name="system.quantity" value="{{system.quantity}}" min="0" />
|
|
30
|
+
</div>
|
|
31
|
+
<div class="field">
|
|
32
|
+
<label>{{localize "{{LOCALE_PREFIX}}.Gear.Weight"}}</label>
|
|
33
|
+
<input type="number" name="system.weight" value="{{system.weight}}" min="0" step="0.1" />
|
|
34
|
+
</div>
|
|
35
|
+
</section>
|
|
36
|
+
|
|
37
|
+
{{!-- DESCRIPTION --}}
|
|
38
|
+
<section class="tab description {{tabs.description.cssClass}}"
|
|
39
|
+
data-tab="description" data-group="primary">
|
|
40
|
+
{{#if isEditable}}
|
|
41
|
+
<prose-mirror name="system.description"
|
|
42
|
+
button="true"
|
|
43
|
+
editable="{{isEditable}}"
|
|
44
|
+
toggled="false"
|
|
45
|
+
value="{{system.description}}">
|
|
46
|
+
{{{enrichedDescription}}}
|
|
47
|
+
</prose-mirror>
|
|
48
|
+
{{else}}
|
|
49
|
+
<div class="description-readonly">{{{enrichedDescription}}}</div>
|
|
50
|
+
{{/if}}
|
|
51
|
+
</section>
|
|
52
|
+
</section>
|
|
53
|
+
|
|
54
|
+
</form>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2022",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"verbatimModuleSyntax": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"allowImportingTsExtensions": false
|
|
15
|
+
},
|
|
16
|
+
"include": ["scripts/**/*"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import vttforge from '@vttforge/vite-plugin';
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Vite config for {{TITLE}}.
|
|
6
|
+
*
|
|
7
|
+
* `@vttforge/vite-plugin` owns the build contract — it bundles
|
|
8
|
+
* `scripts/main.ts` into `dist/main.mjs` (no hash, no bare specifiers),
|
|
9
|
+
* resolves `@import "@vttforge/styles"` at build time, copies the manifest +
|
|
10
|
+
* `lang/` + `templates/` to `dist/`, and syncs the manifest version from
|
|
11
|
+
* `package.json` on every build. The result under `dist/` is the deployable
|
|
12
|
+
* artefact you symlink into Foundry's `Data/systems/{{ID}}/`.
|
|
13
|
+
*/
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
plugins: [vttforge({ id: '{{ID}}', entry: 'scripts/main.ts' })],
|
|
16
|
+
});
|