initial commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
/dist
|
||||
20
LICENSE
Normal file
20
LICENSE
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Feross Aboukhadijeh
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
29
README.md
Normal file
29
README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# WebTorrent.app
|
||||
|
||||
### Streaming torrent client, for the desktop
|
||||
|
||||
## Dev
|
||||
|
||||
```
|
||||
$ npm install
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
```
|
||||
$ npm start
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
Builds the app for OS X, Linux, and Windows, using [electron-packager](https://github.com/maxogden/electron-packager).
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).
|
||||
|
||||
27
index.css
Normal file
27
index.css
Normal file
@@ -0,0 +1,27 @@
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, 'Helvetica Neue', Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
header {
|
||||
position: absolute;
|
||||
width: 500px;
|
||||
height: 250px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -125px;
|
||||
margin-left: -250px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 60px;
|
||||
font-weight: 100;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
17
index.html
Normal file
17
index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Electron boilerplate</title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>Electron boilerplate</h1>
|
||||
</header>
|
||||
<section class="main"></section>
|
||||
<footer></footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
45
index.js
Normal file
45
index.js
Normal file
@@ -0,0 +1,45 @@
|
||||
var electron = require('electron')
|
||||
var app = electron.app
|
||||
|
||||
// report crashes to the Electron project
|
||||
require('crash-reporter').start()
|
||||
|
||||
// adds debug features like hotkeys for triggering dev tools and reload
|
||||
require('electron-debug')()
|
||||
|
||||
// prevent window being garbage collected
|
||||
var mainWindow
|
||||
|
||||
function onClosed () {
|
||||
// dereference the window
|
||||
// for multiple windows store them in an array
|
||||
mainWindow = null
|
||||
}
|
||||
|
||||
function createMainWindow () {
|
||||
const win = new electron.BrowserWindow({
|
||||
width: 600,
|
||||
height: 400
|
||||
})
|
||||
|
||||
win.loadURL('file://' + __dirname + '/index.html')
|
||||
win.on('closed', onClosed)
|
||||
|
||||
return win
|
||||
}
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
if (!mainWindow) {
|
||||
mainWindow = createMainWindow()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('ready', () => {
|
||||
mainWindow = createMainWindow()
|
||||
})
|
||||
44
package.json
Normal file
44
package.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "webtorrent-app",
|
||||
"description": "Streaming torrent client, for the desktop",
|
||||
"version": "0.0.0",
|
||||
"author": {
|
||||
"name": "Feross Aboukhadijeh",
|
||||
"email": "feross@feross.org",
|
||||
"url": "http://feross.org"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/feross/webtorrent-app/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron-debug": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron-packager": "^5.0.0",
|
||||
"electron-prebuilt": "^0.36.0",
|
||||
"standard": "^5.4.1"
|
||||
},
|
||||
"electronVersion": "0.36.0",
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.html",
|
||||
"index.css"
|
||||
],
|
||||
"homepage": "https://webtorrent.io",
|
||||
"keywords": [
|
||||
"electron",
|
||||
"electron-app"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"productName": "WebTorrent",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/feross/webtorrent-app.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "electron-packager . $npm_package_productName --out=dist --ignore='^/dist$' --prune --asar --all --version=$npm_package_electronVersion",
|
||||
"start": "electron .",
|
||||
"test": "standard"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user