Skip to content

Commit

Permalink
Merge pull request #1 from EddieDover/dev
Browse files Browse the repository at this point in the history
Initial upload
  • Loading branch information
EddieDover committed Sep 18, 2023
2 parents 4f0f10b + ae04953 commit e1e5be7
Show file tree
Hide file tree
Showing 21 changed files with 3,510 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deploy/
dist/
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Loads https://github.com/typhonjs-node-config/typhonjs-config-eslint/blob/master/3.0/basic/es8/server/node/.eslintrc
* Loads https://github.com/typhonjs-fvtt/eslint-config-foundry.js/blob/main/0.8.0.js
*
* NPM: https://www.npmjs.com/package/typhonjs-config-eslint
* NPM: https://www.npmjs.com/package/@typhonjs-fvtt/eslint-config-foundry.js
*/
{
// ESLint configs are prone to particular choices, so if the first config below doesn't work for you then replace
// with one that you do prefer. The second config defines globals defined in `foundry.js` for use w/ `no-shadow`.
"extends": [
"./node_modules/typhonjs-config-eslint/3.0/basic/es8/server/node/.eslintrc",
"@typhonjs-fvtt/eslint-config-foundry.js"
],

"parserOptions": {
"ecmaVersion": 2020
},

// Defines / overrides a few more environment parameters not provided in the configs above.
"env": {
"jquery": true,
"es2020": true,
"browser": true
},

// Prevents overwriting any built in globals particularly from `@typhonjs-fvtt/eslint-config-foundry.js`, but also
// node & browser environments. `event / window.event` shadowing is allowed due to being a common variable name and
// an uncommonly used browser feature.
//
// Note: if you are using Typescript you must use `@typescript-eslint/no-shadow`
"rules": {
"no-shadow": ["error", { "builtinGlobals": true, "hoist": "all", "allow": ["event"] }],
"brace-style": ["error", "1tbs"],
"require-jsdoc": "off"
}
}
4 changes: 4 additions & 0 deletions .github/workflows/get-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var fs = require("fs");
console.log(
JSON.parse(fs.readFileSync("./deploy/module.json", "utf8")).version
);
58 changes: 58 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Thanks to Calego / ElfFriend (https://github.com/ElfFriend-DnD/) for the initial reference for this GH Action.
name: Module Tag / Release

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: Install dependencies
run: npm ci

# run the build action; choose `build-deploy` if not minifying your output bundle.
- name: Build deploy directory
run: npm run build-deploy-compress

# create a zip file with all files required by the module to add to the release
- name: Zip Files
working-directory: ./deploy
run: zip -r ./module.zip ./*

# Get the version from 'module.json'
- name: Get Version
shell: bash
id: get-version
run: echo "::set-output name=version::$(node ./.github/workflows/get-version.js)"

# Generate changelog for release body
- name: Changelog
id: Changelog
uses: scottbrenner/generate-changelog-action@master
env:
REPO: ${{ github.repository }}

# Create a release for this specific version
- name: Create Release
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # set this to false if you want to prevent updating existing releases
name: ${{ steps.get-version.outputs.version }}
body: |
${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './deploy/module.json,./deploy/module.zip'
tag_name: ${{ steps.get-version.outputs.version }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

node_modules/

github/

dist/
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
}
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Theater of the Mind
# Theater of the Mind - A [FoundryVTT](https://www.foundryvtt.com) Module

The original intent of this module was to provide a 'party view' feature that I found missing when I first started using [FoundryVTT](https://www.foundryvtt.com) instead of [Fantasy Grounds](https://www.fantasygrounds.com). It will be updated with features that I personally want or need, or are requested of me by some poor soul.

Features:
Adds a 'Party Sheet' similar to that provided by Fantasy Grounds.

TODO:
Maybe Syrinscape support attack rolls and such.
4 changes: 4 additions & 0 deletions env/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Provides a template for verification of .env files
FVTTDEV_DEPLOY_PATH=
FVTTDEV_COMPRESS=
FVTTDEV_SOURCEMAPS=
12 changes: 12 additions & 0 deletions env/build-deploy-compress.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Deployment path for `build-deploy` environment. Replace `./deploy` with the full path to a deployment repo for
# your module. The nice thing about having a separate deployment repo is that it can be really clean without build
# resources and just contain the exact files in your module release. If you are creating commercial modules / systems
# from a private repo or bundling your module and perhaps using Terser to minify / mangle this makes a lot of sense.

# Note: if you are releasing a commercial module then you will not want to ship the sourcemaps so set that to false.
# You may want to further develop the `rollup.config.js` and Github action to generate sourcemaps and archive them which
# is beyond the scope of this demo repo. If you have questions do get in touch.

FVTTDEV_DEPLOY_PATH=./deploy
FVTTDEV_COMPRESS=true
FVTTDEV_SOURCEMAPS=true
12 changes: 12 additions & 0 deletions env/build-deploy.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Deployment path for `build-deploy` environment. Replace `./deploy` with the full path to a deployment repo for
# your module. The nice thing about having a separate deployment repo is that it can be really clean without build
# resources and just contain the exact files in your module release. If you are creating commercial modules / systems
# from a private repo or bundling your module and perhaps using Terser to minify / mangle this makes a lot of sense.

# Note: if you are releasing a commercial module then you will not want to ship the sourcemaps so set that to false.
# You may want to further develop the `rollup.config.js` and Github action to generate sourcemaps and archive them which
# is beyond the scope of this demo repo. If you have questions do get in touch.

FVTTDEV_DEPLOY_PATH=./deploy
FVTTDEV_COMPRESS=false
FVTTDEV_SOURCEMAPS=true
8 changes: 8 additions & 0 deletions env/build-dev-compress.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Deployment path for `build-dev-minify` environment.
# If you are on Windows and the FoundryVTT-Data directory is located in `C:\games\FoundryVTT-Data`
# then make `DEPLOY_PATH=C:\games\FoundryVTT-Data\Data\modules\demo-rollup-module`.
# Of course replace `demo-rollup-module` with the name of the module you are developing.

FVTTDEV_DEPLOY_PATH=./dist
FVTTDEV_COMPRESS=true
FVTTDEV_SOURCEMAPS=true
8 changes: 8 additions & 0 deletions env/build-dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Deployment path for `build-dev` environment.
# If you are on Windows and the FoundryVTT-Data directory is located in `C:\games\FoundryVTT-Data`
# then make `DEPLOY_PATH=C:\games\FoundryVTT-Data\Data\modules\demo-rollup-module`.
# Of course replace `demo-rollup-module` with the name of the module you are developing.

FVTTDEV_DEPLOY_PATH=./dist
FVTTDEV_COMPRESS=false
FVTTDEV_SOURCEMAPS=true
Binary file added images/fgps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions module/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"id": "theater-of-the-mind",
"title": "The Theater of the Mind - DM Tool",
"description": "A module to assist DMs who run theater of the mind adventures.",
"url": "https://github.com/EddieDover/theater-of-the-mind",
"bugs": "https://github.com/EddieDover/theater-of-the-mind/issues",
"changelog": "https://github.com/EddieDover/theater-of-the-mind/releases",
"manifest": "https://github.com/EddieDover/theater-of-the-mind/releases/latest/download/module.json",
"download": "https://github.com/EddieDover/theater-of-the-mind/releases/download/1.0.0/module.zip",
"license": "https://github.com/EddieDover/theater-of-the-mind/raw/main/LICENSE.md",
"readme": "https://github.com/EddieDover/theater-of-the-mind/raw/main/README.md",
"flags": {
"allowBugReporter": true
},
"media": [
{
"type": "cover",
"url": ""
}
],
"authors": [
{
"name": "Eddie Dover",
"email": "ed@eddiedover.dev",
"url": "https://github.com/eddiedover/"
}
],
"version": "0.1.0",
"compatibility": {
"minimum": "11",
"verified": "11"
},
"esmodules": [
"theater-of-the-mind.js"
],
"styles": ["theater-of-the-mind.css"],
"relationships": {
"optional": [
{
"id": "foundryvtt-attack-roll-check-5e", "type": "module"
},
{
"id": "fvtt-syrin-control", "type":"module"
}
],
"systems": [
{
"id": "dnd5e",
"type": "system",
"compatibility": {
"minimum": "2.0.0"
}
}
]
}
}
10 changes: 10 additions & 0 deletions module/styles/theater-of-the-mind.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#totm-cv-table {
width: 100%;
height: 100%a;
text-align: center;
};

tr.finrow {
border-bottom: 1px solid black;
margin-bottom: 5px;
}
Loading

0 comments on commit e1e5be7

Please sign in to comment.