Skip to content

Commit

Permalink
package: rename browser to client and main to server
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-emmanuel committed Oct 28, 2018
1 parent fd2f6b8 commit 263eb84
Show file tree
Hide file tree
Showing 123 changed files with 43 additions and 42 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
node_modules
dist
app/LICENSE
app/browser/*.css*
app/browser/*.png
app/browser/*.js*
app/client/*.css*
app/client/*.png
app/client/*.js*
app/launcher/*.js*
app/main/*.js*
app/server/*.js*
package-lock.json
26 changes: 0 additions & 26 deletions app/browser/index.html

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions app/client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, user-scalable=no"/>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="browser/logo.png" />
<link rel="preload" href="client/fonts/fa-solid-900.woff" as="font"/>
<link rel="preload" href="client/fonts/roboto-medium.woff" as="font"/>
<link rel="stylesheet" type="text/css" href="client/open-stage-control.css" hot-reload/>
<link rel="stylesheet" type="text/css" href="client/theme.css" hot-reload/>
<link rel="stylesheet" type="text/css" href="client/fonts/fontawesome.min.css"/>
<link rel="stylesheet" type="text/css" href="client/fonts/fa-solid.css"/>
<link rel="stylesheet" type="text/css" href="client/fonts/roboto-medium.css"/>
<script src="client/open-stage-control-client.js"></script>
<link rel="shortcut icon" href="browser/favicon.png?2"/>
</head>

<body>
<div id="container"></div>
<div id="sidepanel"></div>
</body>

</html>
File renamed without changes.
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./main/open-stage-control-server')
require('./server/open-stage-control-server')
File renamed without changes.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@
"deb64": "electron-installer-debian --src dist/open-stage-control-linux-x64/ --arch amd64 --dest dist/open-stage-control-linux-x64/ --icon resources/images/logo.png",
"debarm": "electron-installer-debian --src dist/open-stage-control-linux-armv7l/ --arch armv7l --dest dist/open-stage-control-linux-armv7l/ --icon resources/images/logo.png",
"build-css": "node scripts/build-css.js",
"build-js": "npm run build-launcher-js && npm run build-browser-js -- --prod && npm run build-main-js",
"build-browser-js": "node scripts/build-browser.js",
"build-js": "npm run build-launcher-js && npm run build-client-js -- --prod && npm run build-main-js",
"build-client-js": "node scripts/build-client.js",
"build-launcher-js": "node scripts/build-launcher.js",
"build-main-js": "node scripts/build-main.js",
"watch-browser": "npm run build-browser-js -- --watch",
"watch-client": "npm run build-client-js -- --watch",
"watch-browser": "npm run build-client-js -- --watch",
"watch-css": "nodemon --watch src/scss -e scss -x \"npm run build-css -- --reload",
"deploy-docs": "node scripts/build-widgets-reference.js > resources/docs/widgets-reference.md && cd resources && mkdocs gh-deploy --clean && rm -rf site",
"test": "npm run build"
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-browser.js → scripts/build-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ if (prod) {
}

var bundle = build({
input: '../src/browser/index.js',
output: '../app/browser/open-stage-control-client.js',
input: '../src/client/index.js',
output: '../app/client/index.js',
options: {
debug: true,
insertGlobals: false,
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var sass = require('node-sass'),
fs = require('fs')

var indir = path.resolve(__dirname + '/../src/scss/'),
outdir= path.resolve(__dirname + '/../app/browser/')
outdir= path.resolve(__dirname + '/../app/client/')

fs.readdirSync(indir + '/themes/').forEach(file => {

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions scripts/build-widgets-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ Object.assign(global, window)

// Required globals

DOM = require('../src/browser/app/dom')
DOM = require('../src/client/app/dom')
DOM.get = x=>[{addEventListener:()=>{}}]
DOM.init()
CANVAS_FRAMERATE = 1
LANG = 'en'

// Here we go

var widgets = require('../src/browser/app/widgets'),
baseClass = require('../src/browser/app/widgets/common/widget'),
var widgets = require('../src/client/app/widgets'),
baseClass = require('../src/client/app/widgets/common/widget'),
base = baseClass.defaults(),
doc = []

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(options={}) {
width: options.width || 800,
height: options.height || 600,
title: options.title || settings.read('appName'),
icon: path.resolve(__dirname + '/../browser/logo.png'),
icon: path.resolve(__dirname + '/../client/logo.png'),
backgroundColor: options.color || theme.backgroundColor,
type: options.type,
fullscreen: options.fullscreen,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main/server.js → src/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ express.get('*', function(req, res){
} else {
res.send('')
}
} else if (req.path.indexOf('browser/') != -1){
} else if (req.path.indexOf('client/') != -1){
res.sendFile(path.resolve(__dirname + '/..' + req.path))
} else {
res.sendFile(path.resolve(req.path))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 263eb84

Please sign in to comment.