generated from tiddly-gittly/Tiddlywiki-WikiText-Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use https://tiddly-gittly.github.io/Modern.TiddlyDev/
- Loading branch information
Showing
75 changed files
with
7,750 additions
and
2,260 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
resources/ | ||
settings-dev/ | ||
out/ | ||
logs/ | ||
dist/ | ||
wiki/ | ||
template/ | ||
.webpack/ | ||
node_modules/ | ||
localization/ | ||
build-resources/ | ||
.vscode/ | ||
.github/ |
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,15 @@ | ||
const tsEslintConfig = require('./tsconfig.eslint.json'); | ||
|
||
module.exports = { | ||
root: true, | ||
ignorePatterns: tsEslintConfig.exclude, | ||
parserOptions: { | ||
project: './tsconfig.eslint.json', | ||
tsconfigRootDir: __dirname, | ||
}, | ||
extends: ['eslint-config-tidgi'], | ||
rules: { | ||
'unicorn/prefer-dom-node-text-content': 'off', | ||
'unicorn/prefer-modern-dom-apis': 'off', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
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,56 @@ | ||
name: Deploy Tiddlywiki To Github Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 'latest' | ||
run_install: false | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/node_modules | ||
~/.pnpm-store | ||
~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
${{ runner.os }}-node- | ||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Build Library and static website | ||
run: pnpm run publish | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: ./dist | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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 |
---|---|---|
|
@@ -6,94 +6,72 @@ on: | |
- 'v*.*.*' | ||
paths-ignore: | ||
- 'README.md' | ||
- 'docs/**' | ||
- 'wiki/**' | ||
- 'public/**' | ||
- 'scripts/**' | ||
- '.vscode' | ||
- '.idea' | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'wiki/**' | ||
- 'public/**' | ||
- '.scripts/**' | ||
- '.vscode' | ||
- '.idea' | ||
|
||
concurrency: | ||
group: release-ci-group | ||
cancel-in-progress: true | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
Plugins: | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- id: setPluginInfoJSON | ||
run: | | ||
content=`cat ./src/plugin.info` | ||
# the following lines are only required for multi line json | ||
content="${content//'%'/'%25'}" | ||
content="${content//$'\n'/'%0A'}" | ||
content="${content//$'\r'/'%0D'}" | ||
# here we replace "title": "$:/plugins/linonetwo/tw-example-plugin", to "title": "linonetwo/tw-example-plugin", | ||
# so it can be used in tiddly-gittly/tw5-plugin-packer to find output path | ||
content="${content//$\:\/plugins\//}" | ||
# end of optional handling for multi line json | ||
echo "::set-output name=pluginInfoJSON::$content" | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 'latest' | ||
run_install: false | ||
|
||
- name: Get npm cache directory | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
path: | | ||
**/node_modules | ||
~/.pnpm-store | ||
~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: npm i | ||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Make Plugins | ||
run: npm run make | ||
env: | ||
CI: true | ||
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# this should be the same as `scripts/run-action.mjs` | ||
- uses: tiddly-gittly/[email protected] | ||
with: | ||
minify: 'true' | ||
# here we read plugin author and name from pluginInfoJSON, and pluginInfoJSON is read in the step above with id `setPluginInfoJSON` | ||
source: 'dist/plugins/${{fromJson(steps.setPluginInfoJSON.outputs.pluginInfoJSON).title}}' | ||
output: 'dist/out' | ||
uglifyjs-options: '{ "warnings": false, "ie8": false, "safari10": false }' | ||
cleancss-options: '{ "compatibility": "*", "level": 2 }' | ||
|
||
- name: Make Demo Site | ||
run: npx zx ./scripts/build-demo-html.mjs | ||
- name: Build Plugins | ||
run: pnpm run build | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
dist/out/*.json | ||
dist/out/*.zip | ||
dist/*.json | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: ./dist/output | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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
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 @@ | ||
strict-peer-dependencies=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 @@ | ||
lts/* |
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,2 @@ | ||
node_modules/ | ||
dist/ |
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,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"arrowParens": "avoid" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.