Показать страницуИстория страницыСсылки сюдаCopy this pageExport to MarkdownODT преобразованиеНаверх Вы загрузили старую версию документа! Сохранив её, вы создадите новую текущую версию с этим содержимым. Медиафайлы{{tag>electron nodejs js react vuejs angular}} ====== Electron ====== * [[nedb]] * [[node-gyp]] * [[node-libcurl]] * [[leveldb]] * [[vite]] ====== Electron + Webpack 4 + Babel 7 + React 16 + PostCSS + Sass + Ant Design + Jest + Enzyme + Eslint ====== ====== Electron + VueJs + Typescript + Visual Studio Code ====== ====== Electron + React + Typescript + Visual Studio Code ====== launch.js <code json> { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Launch Program", "preLaunchTask": "webpack", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "program": "${workspaceFolder}/main.js", "runtimeArgs": [ ".", "--enable-logging" ] } ] } </code> tasks.js <code json> { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "webpack", "command": "webpack", "args": [] } ] } </code> tsconfig.json <code json> { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Electron: Main", "preLaunchTask": "webpack", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "program": "${workspaceFolder}/main.js", "runtimeArgs": [ ".", "--enable-logging", "--remote-debugging-port=9223", ] }, { "name": "Electron: Renderer", "type": "chrome", "request": "attach", "port": 9223, "webRoot": "${workspaceFolder}", "timeout": 30000 } ], "compounds": [ { "name": "Electron: All", "configurations": [ "Electron: Main", "Electron: Renderer" ] } ] } </code> webpack.config.js <code javascript> module.exports = { entry: "./src/index.tsx", output: { filename: "./bundle.js", //path: __dirname + "/dist" }, mode: "production" , // Enable sourcemaps for debugging webpack output. devtool: "source-map", resolve: { // Add '.ts' and '.tsx' as resolvable extensions. extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js", ".json"] }, module: { rules: [ // All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'. { test: /\.tsx?$/, loader: "awesome-typescript-loader" }, // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'. { enforce: "pre", test: /\.js$/, loader: "source-map-loader" } ] }, // When importing a module whose path matches one of the following, just // assume a corresponding global variable exists and use that instead. // This is important because it allows us to avoid bundling all of our // dependencies, which allows browsers to cache those libraries between builds. externals: { // "react": "React", // "react-dom": "ReactDOM" }, }; </code> ====== Документы ====== * [[https://www.electronjs.org/docs/latest/|Докуметация]] * [[https://www.electronjs.org/docs/latest/api/app|Докуметация API]] ====== Ссылки ====== - [[Electron:vscode]]СохранитьПросмотрРазличияОтменить Сводка изменений Примечание: редактируя эту страницу, вы соглашаетесь на использование своего вклада на условиях следующей лицензии: CC0 1.0 Universal