add execa, node-fetch as samples
This commit is contained in:
parent
8e702586d5
commit
cebd703848
|
@ -2,6 +2,8 @@ import { app, BrowserWindow, shell } from 'electron'
|
|||
import { release } from 'os'
|
||||
import { join } from 'path'
|
||||
import './samples/electron-store'
|
||||
import './samples/node-fetch'
|
||||
import './samples/execa'
|
||||
|
||||
// Disable GPU Acceleration for Windows 7
|
||||
if (release().startsWith('6.1')) app.disableHardwareAcceleration()
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import { execa } from 'execa'
|
||||
|
||||
(async () => {
|
||||
const { stdout } = await execa('echo', ['unicorns'])
|
||||
// console.log(stdout)
|
||||
})()
|
|
@ -0,0 +1,7 @@
|
|||
import fetch from 'node-fetch'
|
||||
|
||||
(async () => {
|
||||
const body = await (await fetch('https://github.com/')).text()
|
||||
|
||||
// console.log(body)
|
||||
})()
|
Loading…
Reference in New Issue