1.2.0 Beta

This commit is contained in:
Theenoro 2017-08-09 23:00:01 +02:00
parent 2ee2072dca
commit 4c42195989
29 changed files with 177 additions and 52 deletions

42
.compilerc Normal file
View File

@ -0,0 +1,42 @@
{
"env": {
"development": {
"application/javascript": {
"presets": [
[
"env",
{
"targets": {
"electron": 1.6
}
}
],
"react"
],
"plugins": [
"transform-async-to-generator"
],
"sourceMaps": "inline"
}
},
"production": {
"application/javascript": {
"presets": [
[
"env",
{
"targets": {
"electron": 1.6
}
}
],
"react"
],
"plugins": [
"transform-async-to-generator"
],
"sourceMaps": "none"
}
}
}
}

9
.eslintrc Normal file
View File

@ -0,0 +1,9 @@
{
"extends": "eslint-config-airbnb",
"rules": {
"import/extensions": 0,
"import/no-extraneous-dependencies": 0,
"import/no-unresolved": [2, { "ignore": ["electron"] }],
"linebreak-style": 0
}
}

6
.gitignore vendored
View File

@ -61,4 +61,8 @@ typings/
ffmpeg*
ffplay*
ffprobe*
lib/youtube-dl*
src/lib/youtube-dl*
node_modules
out
*.exe

View File

@ -1,35 +0,0 @@
const path = require('path');
global.dir = path.join(__dirname);
const {
app,
BrowserWindow,
Menu,
dialog,
ipcMain
} = require('electron');
const fs = require('fs');
const yt_dl = require('./controller/youtube-dl')
var win ;
app.getPath('documents')
app.on('ready', () => {
win = new BrowserWindow({
width: 1010,
height: 800,
minWidth: 1010,
minHeight: 565,
show: false,
frame: true
})
win.loadURL(`file://${__dirname}/app/view/layout.html`)
win.once('ready-to-show', () => {
win.show()
//var x = new yt_dl("https://www.youtube.com/watch?v=UbQgXeY_zi4")
//x.download();
})
win.on('closed', () => {
app.quit();
})
})

View File

@ -1,23 +1,65 @@
{
"name": "electron-simple-youtube-downloader",
"name": "cyb3r-youtube-downloader",
"productName": "cyb3r-youtube-downloader",
"version": "1.0.0",
"description": "electron-simple-youtube-downloader",
"main": "index.js",
"description": "My Electron application description",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"lint": "eslint src"
},
"keywords": [],
"author": "theen",
"license": "MIT",
"config": {
"forge": {
"make_targets": {
"win32": [
"squirrel"
],
"darwin": [
"zip"
],
"linux": [
"deb",
"rpm"
]
},
"electronPackagerConfig": {
"packageManager": "npm"
},
"electronWinstallerConfig": {
"name": "cyb3r_youtube_downloader"
},
"electronInstallerDebian": {},
"electronInstallerRedhat": {},
"github_repository": {
"owner": "",
"name": ""
},
"windowsStoreConfig": {
"packageName": "",
"name": "cyb3ryoutubedownloader"
}
}
},
"dependencies": {
"electron-compile": "^6.4.1",
"electron": "^1.6.11",
"mkdirp": "^0.5.1",
"request": "^2.81.0",
"youtube-dl": "^1.11.1"
"request": "^2.81.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron index.js"
},
"repository": {
"type": "git",
"url": "https://git.tooru.thee.moe/theenoro/electron-simple-youtube-downloader.git"
},
"author": "Theenoro",
"license": "ISC"
"devDependencies": {
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"electron-prebuilt-compile": "1.6.11",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.1.0"
}
}

View File

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

10
src/index.html Normal file
View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
Well hey there!!!
</body>
</html>

53
src/index.js Normal file
View File

@ -0,0 +1,53 @@
const path = require('path');
global.dir = path.join(__dirname);
const {
app,
BrowserWindow,
Menu,
dialog,
ipcMain
} = require('electron');
const fs = require('fs');
const yt_dl = require('./controller/youtube-dl')
var win ;
app.getPath('documents')
const createWindow = () =>{
win = new BrowserWindow({
width: 1010,
height: 800,
minWidth: 1010,
minHeight: 565,
show: false,
frame: true
})
win.loadURL(`file://${__dirname}/app/view/layout.html`)
win.once('ready-to-show', () => {
win.show()
//var x = new yt_dl("https://www.youtube.com/watch?v=UbQgXeY_zi4")
//x.download();
})
win.on('closed', () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
win = null;
});
}
app.on('ready', createWindow);
app.on('window-all-closed', () => {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) {
createWindow();
}
});