mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-16 18:25:17 +02:00
fix electron build package.json
This commit is contained in:
parent
5765d50125
commit
b664380dfd
1 changed files with 6 additions and 2 deletions
|
|
@ -153,9 +153,11 @@ module.exports = {
|
||||||
// This tells Electron where to find the entry point
|
// This tells Electron where to find the entry point
|
||||||
// Note: No "type": "module" since we bundle as CommonJS for compatibility
|
// Note: No "type": "module" since we bundle as CommonJS for compatibility
|
||||||
// with dependencies that use dynamic require()
|
// with dependencies that use dynamic require()
|
||||||
|
// Read version from source package.json (updated by CI from git tag)
|
||||||
|
const sourcePackageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
|
||||||
const packageJson = {
|
const packageJson = {
|
||||||
name: '@x/main',
|
name: '@x/main',
|
||||||
version: '0.1.0',
|
version: sourcePackageJson.version,
|
||||||
main: 'dist-bundle/main.js',
|
main: 'dist-bundle/main.js',
|
||||||
};
|
};
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
|
|
@ -220,9 +222,11 @@ module.exports = {
|
||||||
const packageJsonPath = path.join(appResourcesPath, 'package.json');
|
const packageJsonPath = path.join(appResourcesPath, 'package.json');
|
||||||
if (fs.existsSync(packageJsonPath)) {
|
if (fs.existsSync(packageJsonPath)) {
|
||||||
console.log('Updating package.json...');
|
console.log('Updating package.json...');
|
||||||
|
// Read version from source package.json (updated by CI from git tag)
|
||||||
|
const sourcePackageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
|
||||||
const packageJson = {
|
const packageJson = {
|
||||||
name: '@x/main',
|
name: '@x/main',
|
||||||
version: '0.1.0',
|
version: sourcePackageJson.version,
|
||||||
main: 'dist-bundle/main.js',
|
main: 'dist-bundle/main.js',
|
||||||
// Note: No "type": "module" since we bundle as CommonJS
|
// Note: No "type": "module" since we bundle as CommonJS
|
||||||
// No dependencies/devDependencies since everything is bundled
|
// No dependencies/devDependencies since everything is bundled
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue