-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch to common package layout
* Bundle the es modules into a single one * Bundle the css files into a single one * Minify the bundles for production builds BREAKING CHANGE: A lot of things have been moved around. In particular, the es modules * module/controls.js * filterEffects/FilterManager.js * filterEffects/filtersDB.js * specialEffects/specialsDB.js * specialEffects/SpecialsLayer.js * weatherEffects/weatherDB.js * weatherEffects/WeatherLayer.js do not exist anymore. Asset files also have been moved.
- Loading branch information
Showing
194 changed files
with
18,292 additions
and
1,635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
foundry.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
}, | ||
|
||
env: { | ||
browser: true, | ||
es2021: true, | ||
jquery: true, | ||
}, | ||
|
||
extends: ["eslint:recommended", "@typhonjs-fvtt/eslint-config-foundry.js/0.8.0", "plugin:prettier/recommended"], | ||
|
||
plugins: [], | ||
|
||
globals: { | ||
PIXI: "readonly", | ||
}, | ||
|
||
rules: { | ||
// Specify any specific ESLint rules. | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ["./*.js", "./tools/**/*"], | ||
env: { | ||
node: true, | ||
browser: false, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ko_fi: ghostfvtt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-FileCopyrightText: 2021 Johannes Loher | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# SPDX-FileCopyrightText: 2021 Johannes Loher | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Checks | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
env: | ||
node_version: 16 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Build | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# SPDX-FileCopyrightText: 2021 Johannes Loher | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
env: | ||
node_version: 16 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Build | ||
run: npm run build | ||
env: | ||
NODE_ENV: production | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
publish: | ||
needs: | ||
- lint | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Download production artifacts for publication | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: Create zip file | ||
working-directory: ./dist | ||
run: zip -r ../module.zip . | ||
|
||
- name: Extract version | ||
run: | | ||
echo "::set-output name=version::$(jq -r '.version' package.json)" | ||
id: extract_version | ||
|
||
- name: Create release | ||
id: create_version_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: false | ||
name: ${{steps.extract_version.outputs.version}} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: "./src/module.json, ./module.zip" | ||
|
||
- name: Publish to Foundry Admin | ||
uses: Varriount/[email protected] | ||
with: | ||
username: ${{ secrets.FVTT_USERNAME }} | ||
password: ${{ secrets.FVTT_PASSWORD }} | ||
module-id: ${{ secrets.FVTT_PACKAGE_ID }} | ||
manifest-url: https://github.com/${{ github.repository }}/releases/download/v${{ steps.extract_version.outputs.version }}/module.json | ||
manifest-file: ./src/module.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# SPDX-FileCopyrightText: 2021 Johannes Loher | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Release | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
node_version: 16 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
release: | ||
needs: | ||
- lint | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Configure committer | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
- name: Bump version | ||
uses: qzb/[email protected] | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GH_PAT }} | ||
branch: ${{ github.ref }} | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
fxmaster.lock | ||
fxmaster.lock | ||
node_modules/ | ||
foundry.js | ||
dist/ | ||
.vscode/ | ||
foundryconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
semi: true, | ||
trailingComma: "all", | ||
singleQuote: false, | ||
printWidth: 120, | ||
tabWidth: 2, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const manifest = { | ||
filename: "src/module.json", | ||
updater: require("./manifest-version-updater"), | ||
}; | ||
|
||
const package = { | ||
filename: "package.json", | ||
type: "json", | ||
}; | ||
|
||
const packageLock = { | ||
filename: "package-lock.json", | ||
type: "json", | ||
}; | ||
|
||
module.exports = { | ||
bumpFiles: [package, packageLock, manifest], | ||
}; |
Oops, something went wrong.