Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Jan 7, 2024
1 parent 52427af commit e5e64a7
Show file tree
Hide file tree
Showing 75 changed files with 7,750 additions and 2,260 deletions.
29 changes: 0 additions & 29 deletions .editorconfig

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintignore
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/
15 changes: 15 additions & 0 deletions .eslintrc.js
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',
},
};
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/gh-pages.yml
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
90 changes: 34 additions & 56 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
47 changes: 41 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
.DS_Store

# For IDE
.vscode/**/*
!.vscode/settings.json
!.vscode/extensions.json
.idea/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnp
.pnp.js
.history
*.report

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
Expand Down Expand Up @@ -40,6 +52,9 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
.pnpm-store/

.changeset/pre.json

# TypeScript v1 declaration files
typings/
Expand All @@ -53,6 +68,8 @@ typings/
# Optional eslint cache
.eslintcache

.sonarlint

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand All @@ -71,6 +88,8 @@ typings/
# dotenv environment variables file
.env
.env.test
.env.local
.env.*.local

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand All @@ -80,7 +99,10 @@ typings/

# Nuxt.js build / generate output
.nuxt
dist
dist/
release/
output/
output_resource/

# Gatsby files
.cache/
Expand All @@ -102,7 +124,20 @@ public-dist

# TernJS port file
.tern-port
.DS_Store
tiddlers/$__StoryList.tid
tiddlers/$__language.tid
tiddlers/$__Import.tid

**/*/typings/auto-generated

# for TiddlyWiki
dist/
output/
wiki/tiddlers/$__language.tid
wiki/tiddlers/$__StoryList.tid
wiki/tiddlers/$__StoryList_*.tid
wiki/tiddlers/$__keepstate_*
wiki/tiddlers/$__Import.tid
wiki/tiddlers/$__UpgradeLibrary
wiki/tiddlers/$__UpgradeLibrary_List
wiki/tiddlers/$__temp_*
wiki/tiddlers/$__view.tid
wiki/tiddlers/$__config_Navigation_openLinkFromInsideRiver.tid
wiki/tiddlers/$__config_Navigation_openLinkFromOutsideRiver.tid
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
strict-peer-dependencies=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid"
}
13 changes: 0 additions & 13 deletions .prettierrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions demo/tiddlers/$__DefaultTiddlers.tid

This file was deleted.

4 changes: 0 additions & 4 deletions demo/tiddlers/$__SiteSubtitle.tid

This file was deleted.

1 change: 0 additions & 1 deletion demo/tiddlers/$__plugins_bimlas_kin-filter.json

This file was deleted.

Loading

0 comments on commit e5e64a7

Please sign in to comment.