require() in .hyper.js config
Open
Nobody has claimed this yet.
💬 Feedback Wanted
- Dominant language
- TypeScript
- Stars
- 44.7k
- Forks
- 3.6k
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
Hi! I'd like to use require() in my .hyper.js, but I get a ReferenceError when doing so. Could this be added?
My specific use case is the following:
let fs = require('fs');
module.exports = {
// ...
shell: (() => {
let userPath = 'C:\\Users\\niklas\\Applications\\Git\\bin\\bash.exe';
let systemPath = 'C:\\Program Files\\Git\\bin\\bash.exe';
if (fs.existsSync(userPath)) return userPath;
return systemPath;
})()
};
Eventually, I would like to set some configuration values based on the current platform, too.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names only the .hyper.js configuration file; start by locating where Hyper loads and evaluates that file. Confirm how require() could be made available and how platform-dependent values should behave, then verify the supplied fs.existsSync example and related configuration cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100