From 70eec1a2952e1854878e05fada798638b0aac702 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sat, 25 Nov 2023 16:01:04 +0100 Subject: [PATCH] Adding extension dev-kit building files and also doc placeholder #743 --- .gitignore | 1 + extension/.npmignore | 1 + extension/README.md | 3 +++ extension/ext-enums.tsconfig.json | 11 +++++++++++ extension/ext-interface.tsconfig.json | 12 ++++++++++++ extension/index.ts | 2 ++ extension/package.json | 8 ++++++++ package.json | 5 +++-- 8 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 extension/.npmignore create mode 100644 extension/README.md create mode 100644 extension/ext-enums.tsconfig.json create mode 100644 extension/ext-interface.tsconfig.json create mode 100644 extension/index.ts create mode 100644 extension/package.json diff --git a/.gitignore b/.gitignore index 83d9a5ca2..f9fcf6312 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ test.* /db/ /test/cypress/screenshots/ /extensions/ +/extension/lib/ diff --git a/extension/.npmignore b/extension/.npmignore new file mode 100644 index 000000000..0cd6fced9 --- /dev/null +++ b/extension/.npmignore @@ -0,0 +1 @@ +*.tsconfig.json diff --git a/extension/README.md b/extension/README.md new file mode 100644 index 000000000..f993a91ba --- /dev/null +++ b/extension/README.md @@ -0,0 +1,3 @@ +# @pigallery2/extension-kit + +TODO. diff --git a/extension/ext-enums.tsconfig.json b/extension/ext-enums.tsconfig.json new file mode 100644 index 000000000..590c18670 --- /dev/null +++ b/extension/ext-enums.tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "./../tsconfig.json", + "compilerOptions": { + "outDir": "./lib", + "sourceMap": false + }, + "include": [ + "./../src/common/entities/**/*", + "./../src/common/config/**/*" + ] +} diff --git a/extension/ext-interface.tsconfig.json b/extension/ext-interface.tsconfig.json new file mode 100644 index 000000000..4e29e12ca --- /dev/null +++ b/extension/ext-interface.tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "./../tsconfig.json", + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": true, + "sourceMap": false, + "outDir": "./lib" + }, + "include": [ + "./../src/**/*" + ] +} diff --git a/extension/index.ts b/extension/index.ts new file mode 100644 index 000000000..acfad1cce --- /dev/null +++ b/extension/index.ts @@ -0,0 +1,2 @@ +export {IServerExtension,IExtensionObject} from './lib/backend/model/extension/IExtension'; + diff --git a/extension/package.json b/extension/package.json new file mode 100644 index 000000000..4e2825619 --- /dev/null +++ b/extension/package.json @@ -0,0 +1,8 @@ +{ + "name": "pigallery2-extension-kit", + "version": "2.0.2-edge", + "description": "Interfaces for developing extensions for pigallery2", + "author": "Patrik J. Braun", + "homepage": "https://github.com/bpatrik/pigallery2", + "license": "MIT" +} diff --git a/package.json b/package.json index 3f22ff7ef..b6c77533b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pigallery2", - "version": "2.0.0", + "version": "2.0.2-edge", "description": "This is a photo gallery optimised for running low resource servers (especially on raspberry pi)", "author": "Patrik J. Braun", "homepage": "https://github.com/bpatrik/pigallery2", @@ -25,7 +25,8 @@ "lint": "ng lint", "start-e2e-server": "node ./test/folder-reset test/e2e && node ./src/backend/index --config-path=test/e2e/config.json --Database-dbFolder=test/e2e --Server-port=8080", "cypress:open": "cypress open", - "cypress:run": "cypress run" + "cypress:run": "cypress run", + "build-extension-interface": "tsc -p extension/ext-interface.tsconfig.json && tsc -p extension/ext-enums.tsconfig.json" }, "repository": { "type": "git",