package: move launcher js to src
This commit is contained in:
parent
eaa59ecadc
commit
e41024f5f4
10 changed files with 41 additions and 23 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@ app/browser/scripts.js
|
|||
app/browser/scripts.js.map
|
||||
app/browser/favicon.png
|
||||
app/browser/logo.png
|
||||
app/launcher/scripts.js
|
||||
|
|
|
|||
18
app/launcher/index.html
Normal file
18
app/launcher/index.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html id="launcher">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no"/>
|
||||
<link rel="preload" href="../browser/fonts/roboto-medium.woff" as="font"/>
|
||||
<link rel="preload" href="../browser/fonts/fa-solid-900.woff" as="font"/>
|
||||
<link rel="stylesheet" type="text/css" href="../browser/styles.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../browser/fonts/fontawesome.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../browser/fonts/fa-solid.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../browser/fonts/roboto-medium.css"/>
|
||||
<script src="scripts.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="loading"><div class="spinner"></div></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html id="launcher">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no"/>
|
||||
<link rel="preload" href="../../browser/fonts/roboto-medium.woff" as="font"/>
|
||||
<link rel="preload" href="../../browser/fonts/fa-solid-900.woff" as="font"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../browser/styles.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../browser/fonts/fontawesome.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../browser/fonts/fa-solid.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../browser/fonts/roboto-medium.css"/>
|
||||
<script src="launcher.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="loading"><div class="spinner"></div></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -61,7 +61,7 @@ if (settings.cli) {
|
|||
|
||||
var app = require('./electron-app'),
|
||||
path = require('path'),
|
||||
address = 'file://' + path.resolve(__dirname + '/launcher/' + 'index.html'),
|
||||
address = 'file://' + path.resolve(__dirname + '/../launcher/' + 'index.html'),
|
||||
{ipcMain} = require('electron'),
|
||||
launcher
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
"chokidar": "2.0.2",
|
||||
"electron-localshortcut": "3.1.0",
|
||||
"express": "4.16.3",
|
||||
"jquery": "3.3.1",
|
||||
"osc": "2.2.0",
|
||||
"python-shell": "0.5.0",
|
||||
"vmodule": "1.0.1",
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@
|
|||
"watch-css": "nodemon --watch src/browser/scss -e scss -x \"npm run build-css && node scripts/reload-css.js\"",
|
||||
"watch-js": "nodemon --watch src/browser/js -e js -x \"npm run build-js\"",
|
||||
"build-css": "node scripts/build-css.js",
|
||||
"build-js": "node scripts/build-js.js > app/browser/scripts.js",
|
||||
"build-js": "npm run build-launcher-js && npm run build-browser-js",
|
||||
"build-browser-js": "node scripts/build-browser.js > app/browser/scripts.js",
|
||||
"build-launcher-js": "node scripts/build-launcher.js > app/launcher/scripts.js",
|
||||
"deploy-docs": "cd resources && mkdocs gh-deploy --clean && rm -rf site",
|
||||
"test": "npm run build"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ var ignoreList = ['**/mathjs/dist/math.min.js', '**/jquery.slim.min.js', '**/jqu
|
|||
|
||||
if (prod) console.warn('\x1b[36m%s\x1b[0m', 'Building minified js bundle for production... This may take a while... ');
|
||||
|
||||
b = browserify(path.resolve(__dirname + '/../src/browser/js/browser.js'), {debug:!fast, insertGlobals:fast, noParse: ignoreList})
|
||||
b = browserify(path.resolve(__dirname + '/../src/browser/js/index.js'), {debug:!fast, insertGlobals:fast, noParse: ignoreList})
|
||||
|
||||
b = b.transform(ignoreWrapper(babelify), {presets: ["env"]})
|
||||
|
||||
16
scripts/build-launcher.js
Normal file
16
scripts/build-launcher.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
var browserify = require('browserify'),
|
||||
licensify = require('licensify'),
|
||||
path = require('path'),
|
||||
ignoreList = ['**/mathjs/dist/math.min.js']
|
||||
|
||||
|
||||
browserify(path.resolve(__dirname + '/../src/launcher/index.js'), {
|
||||
debug: true,
|
||||
ignoreMissing: false ,
|
||||
detectGlobals: false,
|
||||
bare: true,
|
||||
noParse: ignoreList
|
||||
})
|
||||
.plugin(licensify)
|
||||
.bundle()
|
||||
.pipe(process.stdout)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
var {remote, ipcRenderer, shell} = require('electron'),
|
||||
var {remote, ipcRenderer, shell} = eval("require('electron')"),
|
||||
{dialog, webContents, Menu, MenuItem, app} = remote.require('electron'),
|
||||
menu = new Menu(),
|
||||
settings = remote.require('./main/settings'),
|
||||
Loading…
Add table
Add a link
Reference in a new issue