-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build process and ci for web-client
- Loading branch information
1 parent
547d671
commit 05eb6e5
Showing
7 changed files
with
305 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"withoutPublish": true, | ||
"tempDir": "package" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,56 @@ | ||
{ | ||
"name": "@ownclouders/web-client", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "ownCloud web client", | ||
"license": "AGPL-3.0", | ||
"private": false, | ||
"type": "module", | ||
"author": "ownCloud GmbH <[email protected]>", | ||
"homepage": "https://github.com/owncloud/web/tree/master/packages/web-client", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/owncloud/web", | ||
"directory": "packages/web-client" | ||
}, | ||
"files": [ | ||
"dist/" | ||
], | ||
"publishConfig": { | ||
"directory": "package", | ||
"linkDirectory": false, | ||
"exports": { | ||
".": { | ||
"default": "./dist/web-client.js", | ||
"require": "./dist/web-client.cjs", | ||
"types": "./dist/src/index.d.ts" | ||
}, | ||
"./graph": { | ||
"default": "./dist/web-client/graph.js", | ||
"require": "./dist/web-client/graph.cjs", | ||
"types": "./dist/src/graph/index.d.ts" | ||
}, | ||
"./graph/generated": { | ||
"default": "./dist/web-client/graph/generated.js", | ||
"require": "./dist/web-client/graph/generated.cjs", | ||
"types": "./dist/src/graph/generated/index.d.ts" | ||
}, | ||
"./ocs": { | ||
"default": "./dist/web-client/ocs.js", | ||
"require": "./dist/web-client/ocs.cjs", | ||
"types": "./dist/src/ocs/index.d.ts" | ||
}, | ||
"./sse": { | ||
"default": "./dist/web-client/sse.js", | ||
"require": "./dist/web-client/sse.cjs", | ||
"types": "./dist/src/sse/index.d.ts" | ||
}, | ||
"./webdav": { | ||
"default": "./dist/web-client/webdav.js", | ||
"require": "./dist/web-client/webdav.cjs", | ||
"types": "./dist/src/webdav/index.d.ts" | ||
} | ||
} | ||
}, | ||
"exports": { | ||
".": { | ||
"default": "./src/index.ts" | ||
|
@@ -35,12 +75,18 @@ | |
} | ||
}, | ||
"scripts": { | ||
"generate-openapi": "rm -rf src/generated && docker run --rm -v \"${PWD}/src:/local\" openapitools/openapi-generator-cli generate -i https://raw.githubusercontent.com/owncloud/libre-graph-api/main/api/openapi-spec/v1.0.yaml -g typescript-axios -o /local/generated" | ||
"generate-openapi": "rm -rf src/generated && docker run --rm -v \"${PWD}/src:/local\" openapitools/openapi-generator-cli generate -i https://raw.githubusercontent.com/owncloud/libre-graph-api/main/api/openapi-spec/v1.0.yaml -g typescript-axios -o /local/generated", | ||
"vite": "vite", | ||
"prepublishOnly": "rm -rf ./package && clean-publish && rm -rf package/dist/tests && find package && cat package/package.json", | ||
"postpublish": "rm -rf ./package" | ||
}, | ||
"devDependencies": { | ||
"vite-plugin-dts": "3.6.0" | ||
}, | ||
"peerDependencies": { | ||
"@ownclouders/web-client": "workspace:*", | ||
"@casl/ability": "^6.3.3", | ||
"axios": "1.6.8", | ||
"clean-publish": "4.2.0", | ||
"fast-xml-parser": "4.3.3", | ||
"lodash-es": "^4.17.21", | ||
"luxon": "3.2.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@ownclouders/tsconfig" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { join, resolve } from 'path' | ||
import { defineConfig, searchForWorkspaceRoot } from 'vite' | ||
import dts from 'vite-plugin-dts' | ||
|
||
const projectRootDir = searchForWorkspaceRoot(process.cwd()) | ||
|
||
export default defineConfig({ | ||
resolve: { | ||
alias: { | ||
path: 'rollup-plugin-node-polyfills/polyfills/path', | ||
crypto: join(projectRootDir, 'polyfills/crypto.js'), | ||
stream: 'rollup-plugin-node-polyfills/polyfills/stream', | ||
string_decoder: 'rollup-plugin-node-polyfills/polyfills/string-decoder', | ||
util: 'rollup-plugin-node-polyfills/polyfills/util', | ||
buffer: 'rollup-plugin-node-polyfills/polyfills/buffer-es6', | ||
process: 'rollup-plugin-node-polyfills/polyfills/process-es6', | ||
events: 'rollup-plugin-node-polyfills/polyfills/events' | ||
} | ||
}, | ||
build: { | ||
lib: { | ||
entry: { | ||
'web-client': resolve(__dirname, 'src/index.ts'), | ||
'web-client/graph': resolve(__dirname, 'src/graph/index.ts'), | ||
'web-client/graph/generated': resolve(__dirname, 'src/graph/generated/index.ts'), | ||
'web-client/ocs': resolve(__dirname, 'src/ocs/index.ts'), | ||
'web-client/sse': resolve(__dirname, 'src/sse/index.ts'), | ||
'web-client/webdav': resolve(__dirname, 'src/webdav/index.ts') | ||
} | ||
} | ||
}, | ||
plugins: [dts()] | ||
}) |
Oops, something went wrong.