Comments (11)
There’s also productName
, which is a bit more suitable for this task.
from electron-packager.
Yes, indeed.
from electron-packager.
app-version could be inferred from the package.json version
field as well, I think. That way building a correctly version app would be as simple as npm version patch|minor|major && npm run build
(assuming npm run build does the right thing).
from electron-packager.
+1, I might take a stab at this. Should it check for package.json
in the cwd? Or search upwards?
Also most likely electron-packager
will be in devDependencies
, but should it also try and fallback to dependencies
if it can't find that?
from electron-packager.
I think searching upwards seems like a good plan regardless, but here are a couple of off-the-cuff ideas in terms of where to start searching:
- Start with
opts.dir
and look upwards, since there may be a package.json there (e.g. to specify main)- Possible disadvantage: if you have a more fully-populated package.json higher up your tree
- Start from
../..
relative to__dirname
of electron-packager's main modules (i.e. above the node_modules folder containing it) - this would likely coincide withprocess.cwd()
in common cases, but wouldn't break if people ran it from elsewhere- Possible disadvantage: if you use electron-packager globally-installed?
My brain cells are limited at the moment so feel free to point out if I am overlooking something dumb :)
from electron-packager.
A good way to avoid the problem in the first way is to keep looking in higher in the tree if the first package.json you find doesn't have an electron-prebuilt
dependency or name.
from electron-packager.
Request: This should infer to package the dependencies
but not the devDependencies
from electron-packager.
Do you mean to include dependencies
in the build or to use the electron-prebuilt
version in dependencies
?
from electron-packager.
^The former, not your pr.
dependencies
mean the electron app needs the package to run, right? devDependencies
are not needed. If one uses the package.json as per npm philosophy, ALL the dependencies
should be in node_modules
and included in the packaged product.
gets off soapbox
from electron-packager.
We already have --prune
, so if node_modules
is in your src path, you can use that to ignore devDependencies
.
from electron-packager.
Ah, I see!
from electron-packager.
Related Issues (20)
- electron-packager does not recognize 64-bit wine installations that do not include the wine64 command HOT 2
- Preserve file attributes while copying with 'extra-resource' option HOT 2
- `--arch=all` broken on macOS
- parallel download race condition errors out with: dest already exists HOT 2
- --win32metadata.requested-execution-level=requireAdministrator Can't create shortcut desktop app when install app after build. HOT 1
- Error: spawn /usr/bin/node ENOENT when launching a process with child_process.spawn from app packaged with electron-packager HOT 6
- risc-v is not supported HOT 2
- Mac OS Arm64 is corrupted when built on Linux 64
- The link to API documentation is broken HOT 3
- Electron Packager 18.1.2 breaks electron-forge HOT 2
- EPERM: operation not permitted, rmdir <path> HOT 1
- Unable to read preload script cdv-electron-preload.js HOT 2
- App crashes on MAS after uploading correctly app
- error when packageConfig.tmpdir set to false HOT 4
- Provide an option to preserve the state of the node_modules when packaging HOT 2
- Incorrect error message when --out is set to the folder containing the entry point HOT 1
- API regression: default is not a function in 18.1.2 HOT 2
- Publish version 17 to npm HOT 8
- 18.2.0 and above don't support non-numeric fourth version component HOT 4
- Multiple `(node:17870) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-packager.