Convert project into a one package.json file structure
This commit is contained in:
parent
1d9a5d90cf
commit
683f3e9f07
20 changed files with 6716 additions and 8912 deletions
|
@ -3,7 +3,7 @@ current_version = 0.18.2
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<candidate>\d+))?
|
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<candidate>\d+))?
|
||||||
serialize =
|
serialize =
|
||||||
{major}.{minor}.{patch}{release}{candidate}
|
{major}.{minor}.{patch}{release}{candidate}
|
||||||
{major}.{minor}.{patch}
|
{major}.{minor}.{patch}
|
||||||
|
|
||||||
|
@ -12,15 +12,11 @@ first_value = 1
|
||||||
|
|
||||||
[bumpversion:part:release]
|
[bumpversion:part:release]
|
||||||
optional_value = production
|
optional_value = production
|
||||||
values =
|
values =
|
||||||
rc
|
rc
|
||||||
production
|
production
|
||||||
|
|
||||||
[bumpversion:file:src/main/package.json]
|
[bumpversion:file:package.json]
|
||||||
search = "version": "{current_version}"
|
|
||||||
replace = "version": "{new_version}"
|
|
||||||
|
|
||||||
[bumpversion:file:src/renderer/package.json]
|
|
||||||
search = "version": "{current_version}"
|
search = "version": "{current_version}"
|
||||||
replace = "version": "{new_version}"
|
replace = "version": "{new_version}"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
|
|
||||||
[lbry-app.app-strings]
|
[lbry-app.app-strings]
|
||||||
file_filter = src/main/dist/locales/<lang>.json
|
file_filter = dist/locales/<lang>.json
|
||||||
source_file = src/main/dist/locales/en.json
|
source_file = dist/locales/en.json
|
||||||
source_lang = en
|
source_lang = en
|
||||||
type = KEYVALUEJSON
|
type = KEYVALUEJSON
|
||||||
|
|
33
README.md
33
README.md
|
@ -29,11 +29,10 @@ This will download and install the LBRY app and its dependencies, including [the
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
Run `./node_modules/.bin/electron src/main`
|
Run `./node_modules/.bin/electron .`
|
||||||
|
|
||||||
### Ongoing Development
|
### Ongoing Development
|
||||||
1. `cd src/renderer`
|
`./watch.sh`
|
||||||
2. `./watch.sh`
|
|
||||||
|
|
||||||
This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src/renderer` folder. This allows you to make changes and see them immediately by reloading the app.
|
This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src/renderer` folder. This allows you to make changes and see them immediately by reloading the app.
|
||||||
|
|
||||||
|
@ -65,35 +64,21 @@ exit
|
||||||
python -m pip install -r build\requirements.txt
|
python -m pip install -r build\requirements.txt
|
||||||
npm install -g yarn
|
npm install -g yarn
|
||||||
yarn install
|
yarn install
|
||||||
```
|
|
||||||
|
|
||||||
3. Change directory to `src\main` and run the following:
|
|
||||||
```
|
|
||||||
yarn install
|
|
||||||
node_modules\.bin\electron-rebuild
|
|
||||||
node_modules\.bin\electron-rebuild
|
|
||||||
cd ..\..
|
|
||||||
```
|
|
||||||
4. Change directory to `src\renderer` and run the following:
|
|
||||||
```
|
|
||||||
yarn install
|
|
||||||
npm rebuild node-sass
|
npm rebuild node-sass
|
||||||
node node_modules\node-sass\bin\node-sass --output dist\css --sourcemap=none scss\
|
node_modules\.bin\node-sass --output dist\css --sourcemap=none src\renderer\scss\
|
||||||
node_modules\.bin\webpack --config webpack.dev.config.js
|
node_modules\.bin\webpack --config src\renderer\webpack.prod.js
|
||||||
xcopy /E dist ..\main\dist
|
xcopy /E src\renderer\dist dist
|
||||||
cd ..\..
|
|
||||||
```
|
```
|
||||||
4. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `src\main\dist\`
|
3. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `dist\`
|
||||||
|
|
||||||
### Building lbry-app
|
### Building lbry-app
|
||||||
1. run `node_modules\.bin\build -p never` from the root of the project.
|
Run `node_modules\.bin\build -p never` from the root of the project.
|
||||||
|
|
||||||
### Running the electron app
|
### Running the electron app
|
||||||
1. Run `node_modules\.bin\electron src\main`
|
Run `node_modules\.bin\electron .`
|
||||||
|
|
||||||
### Ongoing Development
|
### Ongoing Development
|
||||||
1. `cd src\renderer`
|
Run `watch.bat`
|
||||||
2. `watch.bat`
|
|
||||||
|
|
||||||
This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src\renderer` folder. This allows you to make changes and see them immediately by reloading the app.
|
This will set up a monitor that will automatically compile any changes to JS or CSS folders inside of the `src\renderer` folder. This allows you to make changes and see them immediately by reloading the app.
|
||||||
|
|
||||||
|
|
|
@ -5,41 +5,35 @@ Install-Product node $env:nodejs_version
|
||||||
npm install -g yarn
|
npm install -g yarn
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
|
# clean dist\
|
||||||
# do app
|
if (Test-Path -Path dist\) {
|
||||||
cd src\main
|
Remove-Item -Recurse -Force dist\
|
||||||
yarn install
|
}
|
||||||
# necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node)
|
New-Item -ItemType directory -Path dist\
|
||||||
# yes, it needs to be run twice. it fails the first time, not sure why
|
|
||||||
node_modules\.bin\electron-rebuild
|
|
||||||
node_modules\.bin\electron-rebuild
|
|
||||||
cd ..\..
|
|
||||||
|
|
||||||
|
|
||||||
# build ui
|
# build ui
|
||||||
cd src\renderer
|
|
||||||
yarn install
|
|
||||||
npm rebuild node-sass
|
npm rebuild node-sass
|
||||||
node_modules\.bin\node-sass --output dist\css --sourcemap=none scss\
|
node src\renderer\extractLocals.js
|
||||||
node_modules\.bin\webpack --config webpack.prod.js
|
node_modules\.bin\node-sass --output dist\css --sourcemap=none src\renderer\scss\
|
||||||
Copy-Item dist ..\main\ -recurse
|
node_modules\.bin\webpack --config src\renderer\webpack.prod.js
|
||||||
cd ..\..
|
Copy-Item src\renderer\dist dist -recurse
|
||||||
|
|
||||||
|
|
||||||
# get daemon and cli executable
|
# get daemon and cli executable
|
||||||
$package_settings = (Get-Content src\main\package.json -Raw | ConvertFrom-Json).lbrySettings
|
$package_settings = (Get-Content package.json -Raw | ConvertFrom-Json).lbrySettings
|
||||||
$daemon_ver = $package_settings.lbrynetDaemonVersion
|
$daemon_ver = $package_settings.lbrynetDaemonVersion
|
||||||
$daemon_url_template = $package_settings.lbrynetDaemonUrlTemplate
|
$daemon_url_template = $package_settings.lbrynetDaemonUrlTemplate
|
||||||
$daemon_url = $daemon_url_template.Replace('OSNAME', 'windows').Replace('DAEMONVER', $daemon_ver)
|
$daemon_url = $daemon_url_template.Replace('OSNAME', 'windows').Replace('DAEMONVER', $daemon_ver)
|
||||||
Invoke-WebRequest -Uri $daemon_url -OutFile daemon.zip
|
Invoke-WebRequest -Uri $daemon_url -OutFile daemon.zip
|
||||||
Expand-Archive daemon.zip -DestinationPath src\main\dist\
|
Expand-Archive daemon.zip -DestinationPath dist\
|
||||||
dir src\main\dist\ # verify that daemon binary is there
|
dir dist\ # verify that daemon binary is there
|
||||||
rm daemon.zip
|
rm daemon.zip
|
||||||
|
|
||||||
|
|
||||||
# build electron app
|
# build electron app
|
||||||
node_modules\.bin\build -p never
|
node_modules\.bin\build -p never
|
||||||
$binary_name = Get-ChildItem -Path dist -Filter '*.exe' -Name
|
$binary_name = Get-ChildItem -Path dist -Filter 'LBRY Setup*.exe' -Name
|
||||||
$new_name = $binary_name -replace '^LBRY Setup (.*)\.exe$', 'LBRY_$1.exe'
|
$new_name = $binary_name -replace '^LBRY Setup (.*)\.exe$', 'LBRY_$1.exe'
|
||||||
Rename-Item -Path "dist\$binary_name" -NewName $new_name
|
Rename-Item -Path "dist\$binary_name" -NewName $new_name
|
||||||
dir dist # verify that binary was built/named correctly
|
dir dist # verify that binary was built/named correctly
|
||||||
|
|
|
@ -41,8 +41,6 @@ fi
|
||||||
|
|
||||||
[ -d "$ROOT/dist" ] && rm -rf "$ROOT/dist"
|
[ -d "$ROOT/dist" ] && rm -rf "$ROOT/dist"
|
||||||
mkdir -p "$ROOT/dist"
|
mkdir -p "$ROOT/dist"
|
||||||
[ -d "$ROOT/src/main/dist" ] && rm -rf "$ROOT/src/main/dist"
|
|
||||||
mkdir -p "$ROOT/src/main/dist"
|
|
||||||
|
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
|
@ -53,13 +51,11 @@ yarn install
|
||||||
############
|
############
|
||||||
echo -e "\033[0;32mCompiling UI\x1b[m"
|
echo -e "\033[0;32mCompiling UI\x1b[m"
|
||||||
(
|
(
|
||||||
cd "$ROOT/src/renderer"
|
|
||||||
yarn install
|
|
||||||
npm rebuild node-sass
|
npm rebuild node-sass
|
||||||
node extractLocals.js
|
node src/renderer/extractLocals.js
|
||||||
node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/
|
node_modules/.bin/node-sass --output dist/css --sourcemap=none src/renderer/scss/
|
||||||
node_modules/.bin/webpack --config webpack.prod.js
|
node_modules/.bin/webpack --config src/renderer/webpack.prod.js
|
||||||
cp -r dist/* "$ROOT/src/main/dist/"
|
cp -r src/renderer/dist/* "$ROOT/dist/"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,14 +69,14 @@ if $OSX; then
|
||||||
else
|
else
|
||||||
OSNAME="linux"
|
OSNAME="linux"
|
||||||
fi
|
fi
|
||||||
DAEMON_VER=$(node -e "console.log(require(\"$ROOT/src/main/package.json\").lbrySettings.lbrynetDaemonVersion)")
|
DAEMON_VER=$(node -e "console.log(require(\"$ROOT/package.json\").lbrySettings.lbrynetDaemonVersion)")
|
||||||
DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/src/main/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)")
|
DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)")
|
||||||
DAEMON_URL=$(echo ${DAEMON_URL_TEMPLATE//DAEMONVER/$DAEMON_VER} | sed "s/OSNAME/$OSNAME/g")
|
DAEMON_URL=$(echo ${DAEMON_URL_TEMPLATE//DAEMONVER/$DAEMON_VER} | sed "s/OSNAME/$OSNAME/g")
|
||||||
DAEMON_VER_PATH="$BUILD_DIR/daemon.ver"
|
DAEMON_VER_PATH="$BUILD_DIR/daemon.ver"
|
||||||
echo "$DAEMON_VER_PATH"
|
echo "$DAEMON_VER_PATH"
|
||||||
if [[ ! -f $DAEMON_VER_PATH || ! -f $ROOT/src/main/dist/lbrynet-daemon || "$(< "$DAEMON_VER_PATH")" != "$DAEMON_VER" ]]; then
|
if [[ ! -f $DAEMON_VER_PATH || ! -f $ROOT/dist/lbrynet-daemon || "$(< "$DAEMON_VER_PATH")" != "$DAEMON_VER" ]]; then
|
||||||
curl -sL -o "$BUILD_DIR/daemon.zip" "$DAEMON_URL"
|
curl -sL -o "$BUILD_DIR/daemon.zip" "$DAEMON_URL"
|
||||||
unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/src/main/dist/"
|
unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/dist/"
|
||||||
rm "$BUILD_DIR/daemon.zip"
|
rm "$BUILD_DIR/daemon.zip"
|
||||||
echo "$DAEMON_VER" > "$DAEMON_VER_PATH"
|
echo "$DAEMON_VER" > "$DAEMON_VER_PATH"
|
||||||
else
|
else
|
||||||
|
@ -93,20 +89,6 @@ fi
|
||||||
###################
|
###################
|
||||||
# Build the app #
|
# Build the app #
|
||||||
###################
|
###################
|
||||||
echo -e '\033[0;32mBuilding Lbry-app\x1b[m'
|
|
||||||
(
|
|
||||||
cd "$ROOT/src/main"
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
# necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node)
|
|
||||||
# yes, it needs to be run twice. it fails the first time, not sure why
|
|
||||||
set +e
|
|
||||||
# DEBUG=electron-rebuild node_modules/.bin/electron-rebuild .
|
|
||||||
node_modules/.bin/electron-rebuild "$ROOT/src/main"
|
|
||||||
set -e
|
|
||||||
node_modules/.bin/electron-rebuild "$ROOT/src/main"
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ "$FULL_BUILD" == "true" ]; then
|
if [ "$FULL_BUILD" == "true" ]; then
|
||||||
if $OSX; then
|
if $OSX; then
|
||||||
security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain
|
security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain
|
||||||
|
@ -133,5 +115,5 @@ if [ "$FULL_BUILD" == "true" ]; then
|
||||||
|
|
||||||
echo -e '\033[0;32mBuild and packaging complete.\x1b[m'
|
echo -e '\033[0;32mBuild and packaging complete.\x1b[m'
|
||||||
else
|
else
|
||||||
echo -e 'Build complete. Run \033[1;31m./node_modules/.bin/electron src/main\x1b[m to launch the app'
|
echo -e 'Build complete. Run \033[1;31m./node_modules/.bin/electron .\x1b[m to launch the app'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -17,7 +17,7 @@ import github
|
||||||
import changelog
|
import changelog
|
||||||
|
|
||||||
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||||
APP_PACKAGE_JSON_FILE = os.path.join(ROOT, 'src', 'main', 'package.json')
|
APP_PACKAGE_JSON_FILE = os.path.join(ROOT, 'package.json')
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
104
package.json
104
package.json
|
@ -1,9 +1,33 @@
|
||||||
{
|
{
|
||||||
"postinstall": "install-app-deps",
|
"name": "LBRY",
|
||||||
|
"version": "0.18.2",
|
||||||
|
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||||
|
"author": {
|
||||||
|
"name": "LBRY Inc.",
|
||||||
|
"email": "hello@lbry.io"
|
||||||
|
},
|
||||||
|
"homepage": "https://lbry.io/",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"dev": "webpack-dev-server --devtool eval --progress --colors --inline",
|
||||||
|
"precommit": "lint-staged",
|
||||||
|
"prettier": "prettier --trailing-comma es5 --write js/**/*.{js,jsx}",
|
||||||
|
"extract-langs": "node extractLocals.js"
|
||||||
|
},
|
||||||
|
"main": "src/main/main.js",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/lbryio/lbry-app"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/lbryio/lbry-app/issues"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"lbry"
|
||||||
|
],
|
||||||
"build": {
|
"build": {
|
||||||
"asar": false,
|
|
||||||
"directories": {
|
"directories": {
|
||||||
"app": "src/main"
|
"app": "."
|
||||||
},
|
},
|
||||||
"appId": "io.lbry.LBRY",
|
"appId": "io.lbry.LBRY",
|
||||||
"mac": {
|
"mac": {
|
||||||
|
@ -66,12 +90,82 @@
|
||||||
"perMachine": true
|
"perMachine": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"electron-dl": "^1.6.0",
|
||||||
|
"install": "^0.8.7",
|
||||||
|
"jayson": "^2.0.2",
|
||||||
|
"keytar": "^4.0.3",
|
||||||
|
"npm": "^4.2.0",
|
||||||
|
"semver": "^5.3.0",
|
||||||
|
"tree-kill": "^1.1.0",
|
||||||
|
"from2": "^2.3.0",
|
||||||
|
"jshashes": "^1.0.7",
|
||||||
|
"localforage": "^1.5.0",
|
||||||
|
"node-sass": "^4.5.3",
|
||||||
|
"rc-progress": "^2.0.6",
|
||||||
|
"react": "^15.4.0",
|
||||||
|
"react-dom": "^15.4.0",
|
||||||
|
"react-markdown": "^2.5.0",
|
||||||
|
"react-modal": "^1.5.2",
|
||||||
|
"react-paginate": "^4.4.3",
|
||||||
|
"react-redux": "^5.0.3",
|
||||||
|
"react-simplemde-editor": "^3.6.11",
|
||||||
|
"redux": "^3.6.0",
|
||||||
|
"redux-action-buffer": "^1.1.0",
|
||||||
|
"redux-logger": "^3.0.1",
|
||||||
|
"redux-persist": "^4.8.0",
|
||||||
|
"redux-persist-transform-compress": "^4.2.0",
|
||||||
|
"redux-persist-transform-filter": "0.0.10",
|
||||||
|
"redux-thunk": "^2.2.0",
|
||||||
|
"render-media": "^2.10.0",
|
||||||
|
"reselect": "^3.0.0",
|
||||||
|
"y18n": "^3.2.1"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"devtron": "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
"electron": "^1.7.9",
|
"electron": "^1.7.9",
|
||||||
"electron-builder": "^11.7.0",
|
"electron-builder": "^11.7.0",
|
||||||
"electron-debug": "^1.4.0",
|
"electron-debug": "^1.4.0",
|
||||||
"electron-devtools-installer": "^2.2.1"
|
"electron-devtools-installer": "^2.2.1",
|
||||||
|
"babel": "^6.5.2",
|
||||||
|
"babel-cli": "^6.24.1",
|
||||||
|
"babel-core": "^6.18.2",
|
||||||
|
"babel-loader": "^7.1.1",
|
||||||
|
"babel-plugin-react-require": "^3.0.0",
|
||||||
|
"babel-polyfill": "^6.20.0",
|
||||||
|
"babel-preset-es2015": "^6.24.1",
|
||||||
|
"babel-preset-react": "^6.24.1",
|
||||||
|
"babel-preset-stage-2": "^6.18.0",
|
||||||
|
"css-loader": "^0.28.4",
|
||||||
|
"eslint": "^3.10.2",
|
||||||
|
"eslint-config-airbnb": "^13.0.0",
|
||||||
|
"eslint-loader": "^1.6.1",
|
||||||
|
"eslint-plugin-import": "^2.2.0",
|
||||||
|
"eslint-plugin-jsx-a11y": "^2.2.3",
|
||||||
|
"eslint-plugin-react": "^6.7.1",
|
||||||
|
"husky": "^0.13.4",
|
||||||
|
"i18n-extract": "^0.4.4",
|
||||||
|
"json-loader": "^0.5.4",
|
||||||
|
"lint-staged": "^3.6.0",
|
||||||
|
"node-loader": "^0.6.0",
|
||||||
|
"prettier": "^1.4.2",
|
||||||
|
"style-loader": "^0.18.2",
|
||||||
|
"webpack": "^3.0.0",
|
||||||
|
"webpack-dev-server": "^2.4.4",
|
||||||
|
"webpack-merge": "^4.1.1",
|
||||||
|
"webpack-notifier": "^1.5.0",
|
||||||
|
"webpack-target-electron-renderer": "^0.4.0"
|
||||||
},
|
},
|
||||||
"license": "MIT"
|
"postinstall": "install-app-deps",
|
||||||
|
"license": "MIT",
|
||||||
|
"lint-staged": {
|
||||||
|
"src/renderer/js/**/*.{jsx,js}": [
|
||||||
|
"prettier --trailing-comma es5 --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lbrySettings": {
|
||||||
|
"lbrynetDaemonVersion": "0.18.0",
|
||||||
|
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-daemon-vDAEMONVER-OSNAME.zip"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
0
src/common/.gitkeep
Normal file
0
src/common/.gitkeep
Normal file
|
@ -39,7 +39,7 @@ if (isDebug) {
|
||||||
|
|
||||||
// Misc constants
|
// Misc constants
|
||||||
const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest';
|
const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest';
|
||||||
const DAEMON_PATH = process.env.LBRY_DAEMON || path.join(__dirname, 'dist', 'lbrynet-daemon');
|
const DAEMON_PATH = process.env.LBRY_DAEMON || path.join(app.getAppPath(), 'dist', 'lbrynet-daemon');
|
||||||
|
|
||||||
let client = jayson.client.http({
|
let client = jayson.client.http({
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
|
@ -178,7 +178,7 @@ function createWindow () {
|
||||||
if (isDebug) {
|
if (isDebug) {
|
||||||
win.webContents.openDevTools();
|
win.webContents.openDevTools();
|
||||||
}
|
}
|
||||||
win.loadURL(`file://${__dirname}/dist/index.html`)
|
win.loadURL(`file://${app.getAppPath()}/dist/index.html`)
|
||||||
if (openUri) { // We stored and received a URI that an external app requested before we had a window object
|
if (openUri) { // We stored and received a URI that an external app requested before we had a window object
|
||||||
win.webContents.on('did-finish-load', () => {
|
win.webContents.on('did-finish-load', () => {
|
||||||
win.webContents.send('open-uri-requested', openUri);
|
win.webContents.send('open-uri-requested', openUri);
|
||||||
|
@ -240,7 +240,7 @@ function createTray () {
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
// Using @2x for mac retina screens so the icon isn't blurry
|
// Using @2x for mac retina screens so the icon isn't blurry
|
||||||
// file name needs to include "Template" at the end for dark menu bar
|
// file name needs to include "Template" at the end for dark menu bar
|
||||||
iconPath = path.join(app.getAppPath(), "/dist/img/fav/macTemplate@2x.png");
|
iconPath = path.join(app.getAppPath(), "/dist/img/fav/macTemplate@2x.png");
|
||||||
} else {
|
} else {
|
||||||
iconPath = path.join(app.getAppPath(), "/dist/img/fav/32x32.png");
|
iconPath = path.join(app.getAppPath(), "/dist/img/fav/32x32.png");
|
||||||
}
|
}
|
||||||
|
@ -315,7 +315,7 @@ function handleDaemonSubprocessExited() {
|
||||||
// TODO: maybe it would be better to restart the daemon?
|
// TODO: maybe it would be better to restart the daemon?
|
||||||
if (win) {
|
if (win) {
|
||||||
console.log('Did not request daemon stop, so quitting in 5 seconds.');
|
console.log('Did not request daemon stop, so quitting in 5 seconds.');
|
||||||
win.loadURL(`file://${__dirname}/dist/warning.html`);
|
win.loadURL(`file://${app.getAppPath()}/dist/warning.html`);
|
||||||
setTimeout(quitNow, 5000);
|
setTimeout(quitNow, 5000);
|
||||||
} else {
|
} else {
|
||||||
console.log('Did not request daemon stop, so quitting.');
|
console.log('Did not request daemon stop, so quitting.');
|
||||||
|
@ -507,7 +507,7 @@ function upgrade(event, installerPath) {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (win) {
|
if (win) {
|
||||||
win.loadURL(`file://${__dirname}/dist/upgrade.html`);
|
win.loadURL(`file://${app.getAppPath()}/dist/upgrade.html`);
|
||||||
}
|
}
|
||||||
|
|
||||||
shutdownDaemonAndQuit(true);
|
shutdownDaemonAndQuit(true);
|
||||||
|
@ -554,4 +554,4 @@ ipcMain.on('get-auth-token', (event) => {
|
||||||
|
|
||||||
ipcMain.on('set-auth-token', (event, token) => {
|
ipcMain.on('set-auth-token', (event, token) => {
|
||||||
keytar.setPassword("LBRY", "auth_token", token ? token.toString().trim() : null);
|
keytar.setPassword("LBRY", "auth_token", token ? token.toString().trim() : null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
"name": "LBRY",
|
|
||||||
"version": "0.18.2",
|
|
||||||
"main": "main.js",
|
|
||||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
|
||||||
"homepage": "https://github.com/lbryio/lbry-app",
|
|
||||||
"author": {
|
|
||||||
"name": "LBRY Inc.",
|
|
||||||
"email": "hello@lbry.io"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"electron-dl": "^1.6.0",
|
|
||||||
"install": "^0.8.7",
|
|
||||||
"jayson": "^2.0.2",
|
|
||||||
"keytar": "^4.0.3",
|
|
||||||
"npm": "^4.2.0",
|
|
||||||
"semver": "^5.3.0",
|
|
||||||
"tree-kill": "^1.1.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"electron-rebuild": "^1.5.11"
|
|
||||||
},
|
|
||||||
"lbrySettings": {
|
|
||||||
"lbrynetDaemonVersion": "0.18.0",
|
|
||||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-daemon-vDAEMONVER-OSNAME.zip"
|
|
||||||
},
|
|
||||||
"license": "MIT"
|
|
||||||
}
|
|
2016
src/main/yarn.lock
2016
src/main/yarn.lock
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
||||||
var extract = require("i18n-extract");
|
var extract = require("i18n-extract");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
var dir = __dirname + "/../main/dist/locales";
|
var dir = __dirname + "/../../dist/locales";
|
||||||
var path = dir + "/en.json";
|
var path = dir + "/en.json";
|
||||||
|
|
||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ const { remote, ipcRenderer, shell } = require("electron");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const { download } = remote.require("electron-dl");
|
const { download } = remote.require("electron-dl");
|
||||||
const fs = remote.require("fs");
|
const fs = remote.require("fs");
|
||||||
const { lbrySettings: config } = require("../../../../main/package.json");
|
const { lbrySettings: config } = require("../../../../../package.json");
|
||||||
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
|
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
|
||||||
|
|
||||||
export function doOpenModal(modal, modalProps = {}) {
|
export function doOpenModal(modal, modalProps = {}) {
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
{
|
|
||||||
"name": "lbry-web-ui",
|
|
||||||
"version": "0.18.2",
|
|
||||||
"description": "LBRY UI",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"dev": "webpack-dev-server --devtool eval --progress --colors --inline",
|
|
||||||
"precommit": "lint-staged",
|
|
||||||
"prettier": "prettier --trailing-comma es5 --write js/**/*.{js,jsx}",
|
|
||||||
"extract-langs": "node extractLocals.js"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"lbry"
|
|
||||||
],
|
|
||||||
"author": {
|
|
||||||
"name": "LBRY Inc.",
|
|
||||||
"email": "hello@lbry.io"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/lbryio/lbry-app/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/lbryio/lbry-app",
|
|
||||||
"dependencies": {
|
|
||||||
"from2": "^2.3.0",
|
|
||||||
"jshashes": "^1.0.7",
|
|
||||||
"localforage": "^1.5.0",
|
|
||||||
"node-sass": "^4.5.3",
|
|
||||||
"rc-progress": "^2.0.6",
|
|
||||||
"react": "^15.4.0",
|
|
||||||
"react-dom": "^15.4.0",
|
|
||||||
"react-markdown": "^2.5.0",
|
|
||||||
"react-modal": "^1.5.2",
|
|
||||||
"react-paginate": "^4.4.3",
|
|
||||||
"react-redux": "^5.0.3",
|
|
||||||
"react-simplemde-editor": "^3.6.11",
|
|
||||||
"redux": "^3.6.0",
|
|
||||||
"redux-action-buffer": "^1.1.0",
|
|
||||||
"redux-logger": "^3.0.1",
|
|
||||||
"redux-persist": "^4.8.0",
|
|
||||||
"redux-persist-transform-compress": "^4.2.0",
|
|
||||||
"redux-persist-transform-filter": "0.0.10",
|
|
||||||
"redux-thunk": "^2.2.0",
|
|
||||||
"render-media": "^2.10.0",
|
|
||||||
"reselect": "^3.0.0",
|
|
||||||
"y18n": "^3.2.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"babel": "^6.5.2",
|
|
||||||
"babel-cli": "^6.24.1",
|
|
||||||
"babel-core": "^6.18.2",
|
|
||||||
"babel-loader": "^7.1.1",
|
|
||||||
"babel-plugin-react-require": "^3.0.0",
|
|
||||||
"babel-polyfill": "^6.20.0",
|
|
||||||
"babel-preset-es2015": "^6.24.1",
|
|
||||||
"babel-preset-react": "^6.24.1",
|
|
||||||
"babel-preset-stage-2": "^6.18.0",
|
|
||||||
"css-loader": "^0.28.4",
|
|
||||||
"electron-rebuild": "^1.5.11",
|
|
||||||
"eslint": "^3.10.2",
|
|
||||||
"eslint-config-airbnb": "^13.0.0",
|
|
||||||
"eslint-loader": "^1.6.1",
|
|
||||||
"eslint-plugin-import": "^2.2.0",
|
|
||||||
"eslint-plugin-jsx-a11y": "^2.2.3",
|
|
||||||
"eslint-plugin-react": "^6.7.1",
|
|
||||||
"husky": "^0.13.4",
|
|
||||||
"i18n-extract": "^0.4.4",
|
|
||||||
"json-loader": "^0.5.4",
|
|
||||||
"lint-staged": "^3.6.0",
|
|
||||||
"node-loader": "^0.6.0",
|
|
||||||
"prettier": "^1.4.2",
|
|
||||||
"style-loader": "^0.18.2",
|
|
||||||
"webpack": "^3.0.0",
|
|
||||||
"webpack-dev-server": "^2.4.4",
|
|
||||||
"webpack-merge": "^4.1.1",
|
|
||||||
"webpack-notifier": "^1.5.0",
|
|
||||||
"webpack-target-electron-renderer": "^0.4.0"
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
|
||||||
"gitDir": "../..",
|
|
||||||
"src/renderer/js/**/*.{jsx,js}": [
|
|
||||||
"prettier --trailing-comma es5 --write",
|
|
||||||
"git add"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
@echo off
|
|
||||||
|
|
||||||
set found=
|
|
||||||
for %%F in (
|
|
||||||
"%~dp0\node_modules\node-sass\bin\node-sass"
|
|
||||||
"%~dp0\node_modules\.bin\webpack"
|
|
||||||
) do if exist %%F (set found=1)
|
|
||||||
if not defined found EXIT
|
|
||||||
|
|
||||||
node %~dp0\node_modules\node-sass\bin\node-sass --output %~dp0\..\main\dist\css --sourcemap=none %~dp0\scss
|
|
||||||
%~dp0\node_modules\.bin\webpack --config %~dp0\webpack.dev.js --progress --colors --watch
|
|
|
@ -10,7 +10,7 @@ const PATHS = {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: ["babel-polyfill", "./js/main.js"],
|
entry: ["babel-polyfill", "./src/renderer/js/main.js"],
|
||||||
output: {
|
output: {
|
||||||
path: path.join(PATHS.dist, "js"),
|
path: path.join(PATHS.dist, "js"),
|
||||||
publicPath: "/js/",
|
publicPath: "/js/",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
11
watch.bat
Normal file
11
watch.bat
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
set found=
|
||||||
|
for %%F in (
|
||||||
|
"%~dp0\node_modules\node-sass\bin\node-sass"
|
||||||
|
"%~dp0\node_modules\.bin\webpack"
|
||||||
|
) do if exist %%F (set found=1)
|
||||||
|
if not defined found EXIT
|
||||||
|
|
||||||
|
node %~dp0\node_modules\node-sass\bin\node-sass --output %~dp0\dist\css --sourcemap=none %~dp0\src\renderer\scss
|
||||||
|
%~dp0\node_modules\.bin\webpack --config %~dp0\src\renderer\webpack.dev.js --progress --colors --watch
|
|
@ -18,8 +18,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# run sass once without --watch to force update. then run with --watch to keep watching
|
# run sass once without --watch to force update. then run with --watch to keep watching
|
||||||
node_modules/.bin/node-sass --output $DIR/../main/dist/css --sourcemap=none $DIR/scss/
|
node_modules/.bin/node-sass --output $DIR/dist/css --sourcemap=none $DIR/src/renderer/scss/
|
||||||
node_modules/.bin/node-sass --output $DIR/../main/dist/css --sourcemap=none --watch $DIR/scss/ &
|
node_modules/.bin/node-sass --output $DIR/dist/css --sourcemap=none --watch $DIR/src/renderer/scss/ &
|
||||||
|
|
||||||
node_modules/.bin/webpack --config webpack.dev.js --progress --colors --watch
|
node_modules/.bin/webpack --config $DIR/src/renderer/webpack.dev.js --progress --colors --watch
|
||||||
)
|
)
|
Loading…
Reference in a new issue