Skip to content

Commit

Permalink
docs #36, starts work on #31, bump dep vers.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkrins committed Apr 15, 2024
1 parent aaea9e4 commit 3dfd7b6
Show file tree
Hide file tree
Showing 10 changed files with 3,208 additions and 1,366 deletions.
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -33,6 +33,14 @@ Some of the features PlatySync provides are:
You can download the most recent version of PlatySync from [GitHub releases](https://github.com/mattkrins/platysync/releases).
Learn how to use PlatySync by following the [documentation](https://github.com/mattkrins/platysync/wiki).

## 🚀 Install and run

1. Ensure you are running [Node.js](https://nodejs.org/en/download) v18.18.0 or higher.
2. Download the most recent version of PlatySync from the [releases](https://github.com/mattkrins/platysync/releases) page.
3. Extract and install dependencies with ``npm install``
4. Start the software with with ``npm start``\
For additional instructions, refer to the [documentation](https://github.com/mattkrins/platysync/wiki).

## 📚 Everything else

### 📙 Contributing
Expand All @@ -44,6 +52,16 @@ You can find a contribution guide in the [wiki](https://github.com/mattkrins/pla

To build PlatySync, you can follow the [documentation](https://github.com/mattkrins/platysync/wiki/Developing-for-CDAPP).

### 📦 npm scripts

* ``npm install`` Installs dependencies.
* ``npm start`` Starts PlatySync.
* ``npm run service-install`` Install as a windows service.
* ``npm run service-start`` Start windows service.
* ``npm run service-stop`` Stop windows service.
* ``npm run service-uninstall`` Uninstall windows service.
* ``npm run upgrade`` Run after after updating version.

### 📄 Documentation

You can find the documentation for PlatySync [here](https://github.com/mattkrins/platysync/wiki).
9 changes: 9 additions & 0 deletions build/build.js
@@ -1,6 +1,7 @@
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs-extra'
import AdmZip from 'adm-zip'

const __dirname = dirname(fileURLToPath(import.meta.url));

Expand All @@ -12,12 +13,15 @@ pack.scripts = {
"service-uninstall": "WinSW-x64 uninstall service.xml",
"service-start": "WinSW-x64 start service.xml",
"service-stop": "WinSW-x64 stop service.xml",
"upgrade": "node upgrade.js",
};

if (!fs.existsSync('dist')) fs.mkdirSync('dist');
fs.writeFileSync('dist/package.json', JSON.stringify(pack, undefined, 2), 'utf8');
if (fs.existsSync('dist/typings')) fs.removeSync('dist/typings');

if (fs.existsSync('../README.md')) fs.copyFileSync('../README.md', 'dist/README.md');

if (fs.existsSync('WinSW-x64.exe')){
const xml = `<service>
<id>${pack.name}</id>
Expand All @@ -35,4 +39,9 @@ if (fs.existsSync('WinSW-x64.exe')){
fs.copyFileSync('WinSW-x64.exe', 'dist/WinSW-x64.exe');
}

var zip = new AdmZip();
zip.addZipComment(`${pack.name} ver ${pack.version} - Release Package`)
zip.addLocalFolder('dist');
zip.writeZip(`${pack.name} ${pack.version}.zip`);

console.log(`Build complete: ${__dirname}\\dist\\`);

0 comments on commit 3dfd7b6

Please sign in to comment.