Speed up start time

This commit is contained in:
Thomas Nordquist
2019-01-23 21:35:52 +01:00
parent 8091323623
commit 672d5e8109
5 changed files with 18 additions and 9 deletions

View File

@@ -10,6 +10,7 @@
margin: 0;
padding: 0;
}
@keyframes example {
0% {background-color: none;}
25% {background-color: #3f51b5;}
@@ -48,7 +49,7 @@
margin: 37vh auto 0 auto;
height: 25vh;
width: 25vh;
background-image:url('../rings.svg');
/* background-image:url('../rings.svg'); */
background-size: cover;
}
#splash2 {
@@ -124,9 +125,10 @@
document.addEventListener('DOMContentLoaded', onLoad(), false);
function onLoad() {
<% _.forEach(htmlWebpackPlugin.files.js, function(file) { %>loadScript("<%- file %>");<% }); %>
// <% _.forEach(htmlWebpackPlugin.files.js, function(file) { %>loadScript("<%- file %>");<% }); %>
// loadScript("<%= JSON.stringify(htmlWebpackPlugin) %>")
}
</script>
<% _.forEach(htmlWebpackPlugin.files.js, function(file) { %><script src="<%- file %>"></script><% }); %>
</body>
</html>

View File

@@ -14,7 +14,6 @@ declare var window: any
interface Props {
autoExpandLimit: number
didSelectNode?: (node: q.TreeNode) => void
connectionId?: string
tree?: q.Tree
filter: string

View File

@@ -30,11 +30,13 @@ const theme = createMuiTheme({
typography: { useNextVariants: true },
})
const splash = document.getElementById('splash')
if (splash) {
splash.style.animation = 'unsplash 1s ease-out 0s 1 normal forwards'
setTimeout(() => splash.remove(), 1100)
}
setTimeout(() => {
const splash = document.getElementById('splash')
if (splash) {
splash.style.animation = 'unsplash 0.5s ease-in 0s 1 normal forwards'
setTimeout(() => splash.remove(), 600)
}
}, 300)
ReactDOM.render(
<MuiThemeProvider theme={theme}>

View File

@@ -28,6 +28,7 @@ function createWindow() {
mainWindow = new BrowserWindow({
width: 1024,
height: 700,
show: false,
webPreferences: {
nodeIntegration: true,
devTools: true,
@@ -35,6 +36,10 @@ function createWindow() {
icon: iconPath,
})
mainWindow.once('ready-to-show', () => {
mainWindow && mainWindow.show()
})
console.log('icon path', iconPath)
// and load the index.html of the app.
mainWindow.loadFile('app/build/index.html')

View File

@@ -5,7 +5,8 @@
"strictNullChecks": true,
"outDir": "./dist",
"strict": true,
"module": "esnext",
"module": "commonjs",
"moduleResolution": "node",
"sourceRoot": "src/",
"lib": ["es2017", "dom"],
"sourceMap": true