electron-in-action / firesale-fem-v2 Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://frontendmasters.com/courses/electron-v2/
License: Mozilla Public License 2.0
Home Page: https://frontendmasters.com/courses/electron-v2/
License: Mozilla Public License 2.0
If you decided to upgrade electron, you can fix the "require is not defined" issue by adding the webPreferences Object to the BrowserWindow options object and setting nodeIntegration to true and contextIsolation to false:
app.on("ready", () => { mainWindow = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false, }, });
Refer to the docs for more details.
Thanks to Sathiraumesh for the post.
electron-rebuild
sh: electron-rebuild: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: `electron-rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
We should probably add electron-rebuild
to the package.json.
When try to detect file type .md fails, debugging I just see "" as file type, just detect when I drag over a txt extension file as "txt" but .md file type.
const fileTypeIsSupported = file => {
console.log(file.type);
return ['text/plain', 'text/markdown'].includes(file.type);
};
...
`markdownView.addEventListener('dragover', (event) => {
const file = getDraggedFile(event);
if (fileTypeIsSupported(file)) {
markdownView.classList.add('drag-over');
} else {
markdownView.classList.add('drag-error');
}
});`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.