Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
fix: building and porting js to cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
coredev-uk committed May 18, 2024
1 parent d2b81de commit d0bd3e0
Show file tree
Hide file tree
Showing 9 changed files with 1,228 additions and 1,781 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
src/renderer/*hls*.js
build/*
dist/*
src/renderer/lib/*
*.min.*
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"version": "1.6.2",
"description": "A new cross-platform Apple Music experience based on Electron and Vue.js written from scratch with performance in mind.",
"license": "AGPL-3.0",
"exports": "./dist/index.js",
"exports": "./build/index.js",
"main": "./build/index.js",
"author": "Cider Collective <cryptofyre@cider.sh> (https://cider.sh)",
"repository": "github:ciderapp/Cider",
"type": "module",
Expand All @@ -17,7 +18,7 @@
"scripts": {
"bootstrap": "npx -y check-engine && yarn",
"build": "tsc && lessc ./src/renderer/style.less ./src/renderer/style.css",
"start": "npm run build && electron ./dist/index.js",
"start": "npm run build && electron ./build/index.js",
"dist": "npm run build && electron-builder --publish=never",
"dist:win": "npm run build && electron-builder --win --publish=never",
"dist:linux": "npm run build && electron-builder --linux --publish=never",
Expand Down Expand Up @@ -120,8 +121,8 @@
"mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
},
"appId": "cider",
"afterPack": "./resources/afterPack.js",
"afterSign": "./resources/notarize.js",
"afterPack": "./resources/afterPack.cjs",
"afterSign": "./resources/notarize.cjs",
"protocols": [
{
"name": "Cider",
Expand All @@ -137,7 +138,7 @@
],
"extends": null,
"files": [
"./dist/**/*",
"./build/**/*",
"./src/**/*",
"./resources/icons/**/*"
],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ import { init as Sentry } from "@sentry/electron";
import { RewriteFrames } from "@sentry/integrations";
import { utils } from "./base/utils.js";

const appName = 'sh.cider.classic';

if (!app.isPackaged) {
app.setPath("userData", join(app.getPath("appData"), "Cider"));
app.setPath('userData', join(app.getPath('appData'), `${appName}.dev`));
} else {
app.setPath('userData', join(app.getPath('appData'), appName));
}

// Analytics for debugging fun yeah.
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"outDir": "dist",
"outDir": "build",
"inlineSources": true,
"allowJs": true,
"esModuleInterop": true,
Expand Down
6 changes: 3 additions & 3 deletions winget.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
},
"appId": "cider",
"afterPack": "./resources/afterPack.js",
"afterSign": "./resources/notarize.js",
"afterPack": "./resources/afterPack.cjs",
"afterSign": "./resources/notarize.cjs",
"protocols": [
{
"name": "Cider",
"schemes": ["ame", "cider", "itms", "itmss", "musics", "music"]
}
],
"extends": null,
"files": ["./dist/**/*", "./src/**/*", "./resources/icons/**/*"],
"files": ["./build/**/*", "./src/**/*", "./resources/icons/**/*"],
"nsis": {
"oneClick": true,
"perMachine": false,
Expand Down
Loading

0 comments on commit d0bd3e0

Please sign in to comment.