Skip to content

Commit

Permalink
add modern dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacharia2 committed Jul 14, 2023
1 parent f93b7af commit 07a9142
Show file tree
Hide file tree
Showing 29 changed files with 5,955 additions and 497 deletions.
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/
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const tsEslintConfig = require('./tsconfig.eslint.json');

module.exports = {
root: true,
ignorePatterns: tsEslintConfig.exclude,
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
extends: ['eslint-config-tidgi'],
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
50 changes: 50 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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@v3

- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- 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: npm install -g pnpm && 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
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release Plugins

on:
push:
tags:
- 'v*.*.*'
paths-ignore:
- 'README.md'
- 'wiki/**'
- 'public/**'
- 'scripts/**'
- '.vscode'
- '.idea'
pull_request:
branches:
- master
- main
paths-ignore:
- 'README.md'
- 'wiki/**'
- 'public/**'
- '.scripts/**'
- '.vscode'
- '.idea'

concurrency:
group: release-ci-group
cancel-in-progress: true

jobs:
Plugins:
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- 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: npm install -g pnpm && pnpm install

- 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/*.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147 changes: 144 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,148 @@
.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
*.seed
*.pid
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
.pnpm-store/

.changeset/pre.json

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

.sonarlint

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
.env.local
.env.*.local

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

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

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
public-dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

**/*/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


node_modules
dist
output
app.exe
windows-x64-14.15.3
epubs/*.epub
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
strict-peer-dependencies=false
registry=http://registry.npmmirror.com
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
22 changes: 22 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"lineWidth": 180,
"typescript": {
"quoteProps": "asNeeded",
"quoteStyle": "preferSingle",
"binaryExpression.operatorPosition": "sameLine"
},
"json": {},
"markdown": {},
"includes": [
"**/*.{ts,tsx,js,jsx,cjs,mjs,json,md}",
"./*.json",
"./*.js",
"packages/*/.*.js"
],
"excludes": ["**/node_modules", "**/*-lock.json"],
"plugins": [
"https://plugins.dprint.dev/typescript-0.84.4.wasm",
"https://plugins.dprint.dev/json-0.17.2.wasm",
"https://plugins.dprint.dev/markdown-0.15.2.wasm"
]
}
Loading

0 comments on commit 07a9142

Please sign in to comment.