diff --git a/.DS_Store b/.DS_Store index ae8123d..8d7711e 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index d3f7369..c41669a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vscode +.DS_Store # Global Workspace .commoners diff --git a/README.md b/README.md index 48d893a..0bdad74 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # commoners-starter-kit -A cross-platform app for testing the [`commoners`](commoners.dev) build tool. +A cross-platform app built using [`commoners`](commoners.dev). -When new changes are pushed to `main`, this application will automatically be built and distributed in the following formats: +## Overview +This repository is configured to automatically build and distribute the application and its related services when new changes are pushed to `main`. + +### Distribution Formats - [x] Web — Progressive Web App (PWA) - [x] Mac - [x] Windows @@ -9,23 +12,9 @@ When new changes are pushed to `main`, this application will automatically be bu - [ ] iOS - [ ] Android -Related services will be hosted using [Railway](https://railway.app/), where following considerations apply: + diff --git a/commoners.config.ts b/commoners.config.ts index eec2b95..b8b5304 100644 --- a/commoners.config.ts +++ b/commoners.config.ts @@ -1,112 +1,21 @@ -// ------------- PRODUCTION ------------- -import * as bluetoothPlugin from '@commoners/bluetooth' -import * as serialPlugin from '@commoners/serial' -import localServicesPlugin from '@commoners/local-services' -// import { defineConfig } from 'commoners' // NOTE: commoners dependencies are missing in local development... -// // ------------- DEVELOPMENT ------------- -// import * as bluetoothPlugin from '../commoners/packages/plugins/devices/ble/index.js' -// import * as serialPlugin from '../commoners/packages/plugins/devices/serial/index.js' -// import localServicesPlugin from '../commoners/packages/plugins/local-services/index.js' -// import { defineConfig } from '../commoners/packages/core/index' // NOTE: commoners dependencies are missing in local development... - -// ------------- PACKAGE CHANGES ------------- -// "commoners": "file:../commoners/packages/cli", - - -const defineConfig = (o) => o +// import { defineConfig } from '@commoners/solidarity/config'; +const defineConfig = (o) => o export default defineConfig({ - // icon: './icon.png', + icon: './icon.png', electron: { - splash: './splash.html', - window: { - width: 1000 // Adjust default width - } - }, - - - plugins: { - bluetooth: bluetoothPlugin, - serial: serialPlugin, - localServices: localServicesPlugin((ip, env) => { - const isLocalIP = ip === 'localhost' - const hasAuthString = process.env.SHARE_SECRET_KEY === env.SHARE_SECRET_KEY - return hasAuthString || isLocalIP - }), - - selectiveBuilds:{ - isSupported: { - desktop: { - load: true - }, - mobile: { - load: true - }, - web: { - load: false - } - }, - main: () => { - console.log(`desktop build (main)`) - }, - preload: () => { - console.log(commoners.target + ' build (preload)') - }, - render: () => console.log(commoners.target + ' build (render)'), - - } + window: { width: 1000 } }, services: { - - // Packaged with pkg - dynamicNode: { - description: 'A simple Node.js server', - src: './src/services/node/index.js', - publish: 'https://node-production-aa81.up.railway.app/' - }, - - devNode: { - description: 'A development Node.js server', - src: './src/services/node/index.js', - publish: false // NOTE: Must try sending messages and checking - }, - - localNode: { - description: 'A local Node.js server', - src: './src/services/node/index.js', - publish: true - - // { - // // local: true, - // // local: './dist/services/node/index', // NOTE: This actually doesn't change the output location... - // remote: false // Must include to remove auto-built service from remote - // } - }, - - // Packaged with pyinstaller - python: { - description: 'A simple Python server', - src: './src/services/python/main.py', - port: 1111, + service: { + src:'./src/service/index.ts', publish: { - build: 'python -m PyInstaller --name flask --onedir --clean ./src/services/python/main.py --distpath ./build/python', - remote: 'https://python-production-4f11.up.railway.app', - local: { - src: 'flask', - base: './build/python/flask', // Will be copied - } + remote: 'https://node-production-aa81.up.railway.app/' } - }, - - remote: 'https://jsonplaceholder.typicode.com', - - dynamic: { - src: 'http://localhost:1111', // Call the python server in development - publish: 'https://jsonplaceholder.typicode.com' } } }) \ No newline at end of file diff --git a/environment.yml b/environment.yml deleted file mode 100644 index be8a8fa..0000000 --- a/environment.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: commoners-starter-kit -channels: - - defaults -dependencies: - - pip=23.2.1 - - python=3.10.13 - - pip: - - flask==3.0.0 - - flask-cors==4.0.0 - - pyinstaller==6.0.0 -prefix: /opt/anaconda3/envs/commoners-starter-kit diff --git a/index.html b/index.html index 4e7eaa4..06137c8 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,7 @@ - Commoners Starter Kit - @@ -19,10 +17,6 @@

Commoners Starter Kit

-