Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Associate files originally in s3 #59

Merged
merged 11 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 38 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
plugins {
id "io.github.guqing.plugin-development" version "0.0.7-SNAPSHOT"
id "io.freefair.lombok" version "8.0.0-rc2"
id 'java'
id "com.github.node-gradle.node" version "3.3.0"
id "io.freefair.lombok" version "8.0.1"
id "run.halo.plugin.devtools" version "0.0.6"
}

group 'run.halo.s3os'
sourceCompatibility = JavaVersion.VERSION_17

repositories {
mavenCentral()
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
mavenCentral()
}

jar {
enabled = true
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
maven { url 'https://repo.spring.io/milestone' }
}

dependencies {
implementation platform('run.halo.tools.platform:plugin:2.5.0-SNAPSHOT')
implementation platform('run.halo.tools.platform:plugin:2.9.0-SNAPSHOT')
compileOnly 'run.halo.app:api'

implementation platform('software.amazon.awssdk:bom:2.19.8')
Expand All @@ -38,6 +30,38 @@ dependencies {
testImplementation 'io.projectreactor:reactor-test'
}

halo {
version = '2.9.0'
}

haloPlugin {
watchDomains {
consoleSource {
files files('console/src/')
}
}
}

test {
useJUnitPlatform()
}

node {
nodeProjectDir = file("${project.projectDir}/console")
}

task buildFrontend(type: NpxTask) {
command = 'pnpm'
args = ['build']
}

task pnpmInstall(type: NpxTask) {
command = "pnpm"
args = ["install"]
}

build {
// build frontend before build
tasks.getByName('compileJava').dependsOn('buildFrontend')
tasks.getByName("buildFrontend").dependsOn("pnpmInstall")
}
12 changes: 12 additions & 0 deletions console/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
15 changes: 15 additions & 0 deletions console/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript/recommended",
"@vue/eslint-config-prettier",
],
env: {
"vue/setup-compiler-macros": true,
},
};
28 changes: 28 additions & 0 deletions console/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
6 changes: 6 additions & 0 deletions console/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="vite/client" />

declare module "*.vue" {
import Vue from "vue";
export default Vue;
}
45 changes: 45 additions & 0 deletions console/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@halo-dev/plugin-starter",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vite build --watch",
"build": "vite build",
"preview": "vite preview --port 4173",
"test:unit": "vitest --environment jsdom",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
"@halo-dev/components": "^1.5.0",
"@halo-dev/console-shared": "^2.8.0",
"axios": "^1.4.0",
"canvas-confetti": "^1.6.0",
"path-browserify": "^1.0.1",
"vue": "^3.2.41"
},
"devDependencies": {
"@iconify/json": "^2.2.18",
"@rushstack/eslint-patch": "^1.2.0",
"@types/canvas-confetti": "^1.6.0",
"@types/jsdom": "^20.0.0",
"@types/node": "^16.18.0",
"@vitejs/plugin-vue": "^3.1.2",
"@vitejs/plugin-vue-jsx": "^2.0.1",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/test-utils": "^2.2.0",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.26.0",
"eslint-plugin-vue": "^9.6.0",
"jsdom": "^19.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"sass": "^1.58.0",
"typescript": "~4.7.4",
"unplugin-icons": "^0.15.2",
"vite": "^3.1.8",
"vitest": "^0.24.3",
"vue-tsc": "^1.0.9"
}
}