Skip to content

Commit

Permalink
Add automated build
Browse files Browse the repository at this point in the history
  • Loading branch information
undyingwraith committed May 8, 2024
1 parent 5d43bb0 commit ab71887
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 237 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build
run-name: Build triggered by @${{ github.actor }}
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: yarn --frozen-lockfile --check-cache
- name: Run build
run: yarn build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LibraryManager } from "./LibraryManager";
// Setup translations
import '../../i18n';

export function IpmApp(props: IAppInit) {
export function IpmcApp(props: IAppInit) {
return (
<AppContextProvider {...props}>
<LibraryManager />
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { IpmApp } from './components/pages/IpmApp';
export { IpmcApp } from './components/pages/IpmcApp';
export { Regexes, MovieIndexer } from './service/indexer';
export type {
IAppConfiguration,
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { unixfs } from '@helia/unixfs';
import { create } from 'kubo-rpc-client';
import fs from 'fs';

import { IConfigurationService, INodeService, IInternalProfile, IProfile, IIpfsService, IFileInfo } from 'ipm-core';
import { IConfigurationService, INodeService, IInternalProfile, IProfile, IIpfsService, IFileInfo } from 'ipmc-core';

function getProfileFolder(name: string): string {
return `./profiles/${name}`
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/src/renderer/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IpmApp } from "ipm-core";
import { IpmcApp } from "ipmc-core";

function App(): JSX.Element {
return <IpmApp
return <IpmcApp
nodeService={window.nodeService}
configService={window.configService}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/src/generateThumbnails.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IPFSEntry, IPFSHTTPClient } from "kubo-rpc-client/types";
import { Regexes } from 'ipm-core';
import { Regexes } from 'ipmc-core';
import ffmpeg from 'fluent-ffmpeg';
import fs from 'fs';
import cliProgress from 'cli-progress';
Expand Down
17 changes: 10 additions & 7 deletions packages/webui/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>IPM</title>
<link id="favicon" rel="icon" href=""/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta charset="UTF-8">
<title>IPMC</title>
<link id="favicon" rel="icon" href="" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>

<body class="dx-viewport" style="margin: 0">
<script>var global = global || window</script>
<script type="module" src="/src/index.tsx"></script>
<div id="root"></div>
<script>var global = global || window</script>
<script type="module" src="/src/index.tsx"></script>
<div id="root"></div>
</body>

</html>
5 changes: 2 additions & 3 deletions packages/webui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { IFileInfo, IpmApp } from 'ipmc-core';
import { IFileInfo, IpmcApp } from 'ipmc-core';

import { webSockets } from '@libp2p/websockets';
import { webTransport } from '@libp2p/webtransport';
Expand All @@ -16,7 +16,7 @@ import { unixfs } from '@helia/unixfs';
import { create } from 'kubo-rpc-client';

export function App() {
return <IpmApp
return <IpmcApp
configService={{
getProfile(name) {
const value = window.localStorage.getItem('profile_' + name);
Expand Down Expand Up @@ -129,4 +129,3 @@ export function App() {
}}
/>
};

124 changes: 0 additions & 124 deletions packages/webui/src/AppContext.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions packages/webui/src/LibraryBrowser.ts

This file was deleted.

11 changes: 0 additions & 11 deletions packages/webui/src/Theme.ts

This file was deleted.

69 changes: 34 additions & 35 deletions packages/webui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
{
"compilerOptions": {
"allowJs": false,
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": [
"esnext",
"dom",
"dom.iterable"
],
"moduleResolution": "node",
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"resolveJsonModule": true,
"module": "esnext",
"target": "ESNext",
"downlevelIteration": true,
"isolatedModules": true
},
"include": [
"src",
"typings.d.ts",
"vite.config.ts",
".eslintrc.js",
".prettierrc.js"
]
"compilerOptions": {
"allowJs": false,
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": [
"esnext",
"dom",
"dom.iterable"
],
"moduleResolution": "node",
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": true,
"resolveJsonModule": true,
"module": "esnext",
"target": "ESNext",
"downlevelIteration": true,
"isolatedModules": true
},
"include": [
"src",
"typings.d.ts",
"vite.config.ts",
".eslintrc.js",
".prettierrc.js"
]
}
44 changes: 22 additions & 22 deletions packages/webui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import {defineConfig} from 'vite';
import { defineConfig } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
const isProd = mode === 'production';
return {
build: {
outDir: 'dist',
emptyOutDir: true,
minify: isProd,
sourcemap: command === 'serve',
rollupOptions: { treeshake: true }
},
plugins: [
nodePolyfills({
include: ['crypto', 'buffer', 'stream', 'util'],
globals: {
Buffer: true,
global: true,
process: true,
},
protocolImports: true,
})
],
};
const isProd = mode === 'production';
return {
build: {
outDir: 'dist',
emptyOutDir: true,
minify: isProd,
sourcemap: command === 'serve',
rollupOptions: { treeshake: true }
},
plugins: [
nodePolyfills({
include: ['crypto', 'buffer', 'stream', 'util'],
globals: {
Buffer: true,
global: true,
process: true,
},
protocolImports: true,
})
],
};
});

0 comments on commit ab71887

Please sign in to comment.