Commit 2268c634 authored by nanahira's avatar nanahira

sort

parent c9e317fb
...@@ -111,3 +111,5 @@ dist ...@@ -111,3 +111,5 @@ dist
Dockerfile Dockerfile
.gitlab-ci.yml .gitlab-ci.yml
/config.yaml /config.yaml
.idea
/data*
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
...@@ -104,6 +104,8 @@ dist ...@@ -104,6 +104,8 @@ dist
.tern-port .tern-port
/build /build
/dist
/output /output
/config.yaml /config.yaml
/data .idea
/data*
stages: stages:
- build - build
- combine
- deploy - deploy
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_TEST_ARM_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm
CONTAINER_TEST_X86_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
before_script: before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build: pack:
stage: build stage: build
tags:
- linux
script:
- npm ci
- npm run build
- npm run pack
artifacts:
paths:
- output
build-x86:
stage: build
tags:
- docker
script:
- docker build --pull -t $CONTAINER_TEST_X86_IMAGE .
- docker push $CONTAINER_TEST_X86_IMAGE
build-arm:
stage: build
tags:
- docker-arm
script:
- docker build --pull -t $CONTAINER_TEST_ARM_IMAGE .
- docker push $CONTAINER_TEST_ARM_IMAGE
combine:
stage: combine
tags: tags:
- docker - docker
script: script:
- docker build --pull -t $CONTAINER_TEST_IMAGE . - docker pull $CONTAINER_TEST_X86_IMAGE
- docker push $CONTAINER_TEST_IMAGE - docker pull $CONTAINER_TEST_ARM_IMAGE
- docker manifest create $CONTAINER_TEST_IMAGE --amend $CONTAINER_TEST_X86_IMAGE --amend $CONTAINER_TEST_ARM_IMAGE
- docker manifest push $CONTAINER_TEST_IMAGE
deploy_latest: deploy_latest:
stage: deploy stage: deploy
......
/install-npm.sh
.git*
/output
/dest
/config.yaml
.idea
.dockerignore
Dockerfile
/src
.eslintrc.js
.prettierrc
webpack.config.js
tsconfig.json
/data*
{
"singleQuote": true,
"trailingComma": "all"
}
\ No newline at end of file
FROM node:buster-slim FROM node:bullseye-slim
RUN apt update && apt -y install python3 build-essential && rm -rf /var/lib/apt/lists/* LABEL Author="Nanahira <nanahira@momobako.com>"
RUN apt update && apt -y install python3 build-essential && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY ./package*.json ./ COPY ./package*.json ./
RUN npm ci RUN npm ci
......
This diff is collapsed.
#!/bin/bash
npm install --save \
lodash
npm install --save-dev \
@types/node \
@types/lodash \
typescript \
'@typescript-eslint/eslint-plugin@^4.28.2' \
'@typescript-eslint/parser@^4.28.2 '\
'eslint@^7.30.0' \
'eslint-config-prettier@^8.3.0' \
'eslint-plugin-prettier@^3.4.0' \
prettier
This diff is collapsed.
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
"name": "league-tabulate", "name": "league-tabulate",
"version": "1.0.0", "version": "1.0.0",
"description": "Tabulator", "description": "Tabulator",
"main": "build/run.js", "main": "dist/run.js",
"scripts": { "scripts": {
"build": "./node_modules/.bin/tsc", "build": "./node_modules/.bin/tsc",
"start": "node build/run.js" "start": "node dist/run.js",
"pack": "mkdir output ; pkg --out-path output ."
}, },
"repository": { "repository": {
"type": "git", "type": "git",
...@@ -13,13 +14,29 @@ ...@@ -13,13 +14,29 @@
}, },
"author": "Nanahira", "author": "Nanahira",
"license": "ISC", "license": "ISC",
"bin": "dist/run.js",
"pkg": {
"scripts": [
"dist/**/*.js"
],
"assets": []
},
"dependencies": { "dependencies": {
"@types/node": "^14.6.0",
"@types/underscore": "^1.10.22",
"jinja-js": "^0.1.8", "jinja-js": "^0.1.8",
"lodash": "^4.17.21",
"moment": "^2.27.0", "moment": "^2.27.0",
"typescript": "^4.0.2",
"underscore": "^1.10.2",
"yaml": "^1.10.0" "yaml": "^1.10.0"
},
"devDependencies": {
"@types/lodash": "^4.14.172",
"@types/node": "^16.6.2",
"@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.29.2",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"pkg": "^5.3.1",
"prettier": "^2.3.2",
"typescript": "^4.3.5"
} }
} }
...@@ -2,7 +2,7 @@ import fs from "fs"; ...@@ -2,7 +2,7 @@ import fs from "fs";
import moment from "moment"; import moment from "moment";
import jinja from "jinja-js"; import jinja from "jinja-js";
import yaml from "yaml"; import yaml from "yaml";
import _ from "underscore"; import _ from "lodash";
interface Member { interface Member {
name: string; name: string;
......
{ {
"compilerOptions": { "compilerOptions": {
"outDir": "build", "outDir": "dist",
"module": "commonjs", "module": "commonjs",
"target": "esnext", "target": "esnext",
"esModuleInterop": true, "esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"declaration": true,
"sourceMap": true "sourceMap": true
}, },
"compileOnSave": true, "compileOnSave": true,
"allowJs": true, "allowJs": true,
"include": [ "include": [
"*.ts" "*.ts",
"src/**/*.ts",
"test/**/*.ts"
] ]
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment