Skip to content

Commit

Permalink
intc
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbiaw committed Oct 9, 2023
0 parents commit f17c850
Show file tree
Hide file tree
Showing 146 changed files with 35,258 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-typescript"]
}
38 changes: 38 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
env: {
browser: true,
es6: true
},
extends: ["eslint:recommended", "prettier"],
plugins: ["prettier"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
overrides: [
{
files: ["**/*.ts", "**/*.tsx"],
extends: [
"airbnb-base",
"airbnb-typescript",
"prettier",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: { jsx: true },
project: "./tsconfig.eslint.json",
tsconfigRootDir: __dirname
},
plugins: ["@typescript-eslint", "prettier"],
rules: {
"no-continue": "off",
"no-multi-assign": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-return-assign": "off"
}
}
]
};
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build

on:
push:
tags:
- "v*.*.*"

jobs:
check:
if: "github.repository == 'rs1703/koushoku'"
name: Cancel previous actions
runs-on: ubuntu-latest

steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
all_but_latest: true

build:
if: "github.repository == 'rs1703/koushoku'"
name: Build
runs-on: ubuntu-latest
needs: check

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-go@v3
with:
go-version: "^1.18.0"

- run: make build

- uses: borales/[email protected]
with:
cmd: install

- uses: borales/[email protected]
with:
cmd: prod

- uses: actions/upload-artifact@v3
with:
name: linux-386
path: bin/386
retention-days: 1

- uses: actions/upload-artifact@v3
with:
name: linux-amd64
path: bin/amd64
retention-days: 1

- uses: actions/upload-artifact@v3
with:
name: assets
path: bin/assets
retention-days: 1

- uses: actions/upload-artifact@v3
with:
name: templates
path: bin/templates
retention-days: 1

- uses: actions/upload-artifact@v3
with:
name: static
path: |
bin/android-chrome-192x192.png
bin/android-chrome-512x512.png
bin/apple-touch-icon.png
bin/cover.jpg
bin/favicon-16x16.png
bin/favicon-32x32.png
bin/favicon.ico
bin/robots.txt
retention-days: 1

publish:
if: "github.repository == 'rs1703/koushoku'"
name: Publish
runs-on: ubuntu-latest
needs: [build]

steps:
- uses: actions/download-artifact@v3
with:
path: .

- run: |
cp -r {assets,templates} linux-386
cp static/* linux-386
zip -r linux-386.zip linux-386
cp -r {assets,templates} linux-amd64
cp static/* linux-amd64
zip -r linux-amd64.zip linux-amd64
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: linux-*.zip
190 changes: 190 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
config.ini
!config/config.ini
koushoku.ini
koushoku.yaml

build
dist
data

*_generator.go
*_dev.go
*_test.go
secret.go

*.tar.*
bash.sh
contrib/nginx/*.conf

*.bak
*.service

bin/*
bin/app.webmanifest
bin/assets/**/*.development.*
bin/assets/favicon.ico
!bin/templates
!bin/assets
!bin/alias.txt
!bin/blacklist.txt
!bin/robots.txt
!bin/metadata.json

!bin/cover.jpg
!bin/app.webmanifest
!bin/favicon.ico
!bin/favicon-16x16.png
!bin/favicon-32x32.png
!bin/android-chrome-192x192.png
!bin/android-chrome-512x512.png
!bin/apple-touch-icon.png

# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

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

# Runtime data
pids
*.pid
*.seed
*.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/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# 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 variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

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

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# 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

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
22 changes: 22 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"arrowParens": "avoid",
"printWidth": 120,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "none",
"overrides": [
{
"files": ["*.less"],
"options": {
"parser": "less"
}
},
{
"files": ["*.html"],
"options": {
"parser": "go-template"
}
}
]
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Backend",
"type": "shell",
"command": "make build",
"group": {
"kind": "build"
}
}
]
}
Loading

0 comments on commit f17c850

Please sign in to comment.