Removed all tracked of Electron
This commit is contained in:
parent
1935992e82
commit
1adf955e6e
15
404.html
15
404.html
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
permalink: /404.html
|
|
||||||
---
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Loading..</title>
|
|
||||||
</head>
|
|
||||||
<body style='background:black'>
|
|
||||||
<script>
|
|
||||||
document.location.href = '/index.html'
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,10 +1,12 @@
|
|||||||
# Ronin
|
RONIN
|
||||||
|
|
||||||
|
---------------
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/hundredrabbits/100r.co/master/media/content/characters/ronin.hello.png" width="300"/>
|
<img src="https://raw.githubusercontent.com/hundredrabbits/100r.co/master/media/content/characters/ronin.hello.png" width="300"/>
|
||||||
|
|
||||||
Ronin is a <b>procedural graphics tool</b> designed to automate simple graphical tasks, like resizing, cropping, coloring, and generating algorithmic images. It interprets a minimal <a href="https://en.wikipedia.org/wiki/Lisp_(programming_language)" target="_blank" rel="noreferrer" class="external ">dialect of LISP</a>, look at these <a href="https://github.com/hundredrabbits/Ronin/tree/master/examples" target="_blank" rel="noreferrer" class="external ">examples</a> to better understand how this all works.
|
Ronin is a procedural graphics tool designed to automate simple graphical tasks, like resizing, cropping, coloring, and generating algorithmic images. It interprets a minimal dialect of LISP, look at the examplesto better understand how this all works.
|
||||||
|
|
||||||
The library updates is constantly revealing new applications to Ronin, you can see the list of available functions <a href="https://github.com/hundredrabbits/Ronin#library" target="_blank" rel="noreferrer" class="external ">here</a>. Most of our iconography and designs were created with both <a href="https://hundredrabbits.itch.io/Ronin" target="_blank">Ronin</a> and <a href="https://hundredrabbits.itch.io/dotgrid">Dotgrid</a>.
|
The library updates is constantly revealing new applications to Ronin, you can see the list of available functions here. Most of our iconography and designs were created with both Ronin and Dotgrid.
|
||||||
|
|
||||||
Learn more by reading the <a href="https://github.com/Hundredrabbits/Ronin" target="_blank" rel="noreferrer" class="external ">manual</a>, or have a look at some experiments on <a href="https://twitter.com/neauoire/status/1152481692193419267" target="_blank" rel="noreferrer" class="external ">twitter</a>. If you need <b>help</b>, visit the <a href="https://hundredrabbits.itch.io/ronin/community" target="_blank" rel="noreferrer" class="external ">Community</a>, follow the [workshop](https://github.com/hundredrabbits/Ronin/blob/master/resources/WORKSHOP.md) or watch the [video tutorial](https://www.youtube.com/watch?v=SgAWGh1s9zg).
|
Learn more by reading the <a href="https://github.com/Hundredrabbits/Ronin" target="_blank" rel="noreferrer" class="external ">manual</a>, or have a look at some experiments on <a href="https://twitter.com/neauoire/status/1152481692193419267" target="_blank" rel="noreferrer" class="external ">twitter</a>. If you need <b>help</b>, visit the <a href="https://hundredrabbits.itch.io/ronin/community" target="_blank" rel="noreferrer" class="external ">Community</a>, follow the [workshop](https://github.com/hundredrabbits/Ronin/blob/master/resources/WORKSHOP.md) or watch the [video tutorial](https://www.youtube.com/watch?v=SgAWGh1s9zg).
|
||||||
|
|
||||||
@ -18,19 +20,6 @@ Learn more by reading the <a href="https://github.com/Hundredrabbits/Ronin" targ
|
|||||||
(export)
|
(export)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install & Run
|
|
||||||
|
|
||||||
You can download [builds](https://hundredrabbits.itch.io/ronin) for **OSX, Windows and Linux**, or if you wish to build it yourself, follow these steps:
|
|
||||||
|
|
||||||
```
|
|
||||||
git clone https://github.com/hundredrabbits/Ronin.git
|
|
||||||
cd Ronin/desktop/
|
|
||||||
npm install
|
|
||||||
npm start
|
|
||||||
```
|
|
||||||
|
|
||||||
<img src='https://raw.githubusercontent.com/hundredrabbits/Ronin/master/resources/PREVIEW.jpg' width='600'/>
|
|
||||||
|
|
||||||
## Helpers
|
## Helpers
|
||||||
|
|
||||||
Ronin helpers are keywords that facilitates adding coordinates from the canvas into your script. The currently supported helpers are `$rect`, `$pos`, `$circle`, `$line`, `$drag` and `$view`. Holding right-click while using a $helper will run the script as the mouse is injecting coordinates into the script. Paste the following script, and trace a shape in the canvas:
|
Ronin helpers are keywords that facilitates adding coordinates from the canvas into your script. The currently supported helpers are `$rect`, `$pos`, `$circle`, `$line`, `$drag` and `$view`. Holding right-click while using a $helper will run the script as the mouse is injecting coordinates into the script. Paste the following script, and trace a shape in the canvas:
|
||||||
@ -153,13 +142,8 @@ To save an image in memory, open an image file with Ronin, or drag an image file
|
|||||||
- `(test name a b)`
|
- `(test name a b)`
|
||||||
- `(benchmark fn)` Logs time taken to execute a function.
|
- `(benchmark fn)` Logs time taken to execute a function.
|
||||||
|
|
||||||
<img src='https://raw.githubusercontent.com/hundredrabbits/Ronin/master/resources/PREVIEW2.jpg' width='600'/>
|
Extras
|
||||||
|
|
||||||
<img src='https://raw.githubusercontent.com/hundredrabbits/Ronin/master/resources/PREVIEW3.jpg' width='600'/>
|
- Themes: https://github.com/hundredrabbits/Themes
|
||||||
|
- Support: https://patreon.com/100
|
||||||
## Extras
|
|
||||||
|
|
||||||
- This application supports the [Ecosystem Theme](https://github.com/hundredrabbits/Themes).
|
|
||||||
- Support this project through [Patreon](https://patreon.com/100).
|
|
||||||
- See the [License](LICENSE.md) file for license rights and limitations (MIT).
|
|
||||||
- Pull Requests are welcome!
|
- Pull Requests are welcome!
|
Binary file not shown.
BIN
desktop/icon.ico
BIN
desktop/icon.ico
Binary file not shown.
Before Width: | Height: | Size: 105 KiB |
BIN
desktop/icon.png
BIN
desktop/icon.png
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB |
@ -1,81 +0,0 @@
|
|||||||
'use strict'
|
|
||||||
|
|
||||||
/* global createWindow */
|
|
||||||
|
|
||||||
const { app, BrowserWindow, Menu } = require('electron')
|
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
let isShown = true
|
|
||||||
|
|
||||||
app.win = null
|
|
||||||
|
|
||||||
app.on('ready', () => {
|
|
||||||
app.win = new BrowserWindow({
|
|
||||||
width: 780,
|
|
||||||
height: 462,
|
|
||||||
minWidth: 380,
|
|
||||||
minHeight: 360,
|
|
||||||
backgroundColor: '#000',
|
|
||||||
icon: path.join(__dirname, { darwin: 'icon.icns', linux: 'icon.png', win32: 'icon.ico' }[process.platform] || 'icon.ico'),
|
|
||||||
resizable: true,
|
|
||||||
frame: process.platform !== 'darwin',
|
|
||||||
skipTaskbar: process.platform === 'darwin',
|
|
||||||
autoHideMenuBar: process.platform === 'darwin',
|
|
||||||
webPreferences: { zoomFactor: 1.0, nodeIntegration: true, backgroundThrottling: false }
|
|
||||||
})
|
|
||||||
|
|
||||||
app.win.loadURL(`file://${__dirname}/sources/index.html`)
|
|
||||||
// app.inspect()
|
|
||||||
|
|
||||||
app.win.on('closed', () => {
|
|
||||||
app.quit()
|
|
||||||
})
|
|
||||||
|
|
||||||
app.win.on('hide', function () {
|
|
||||||
isShown = false
|
|
||||||
})
|
|
||||||
|
|
||||||
app.win.on('show', function () {
|
|
||||||
isShown = true
|
|
||||||
})
|
|
||||||
|
|
||||||
app.on('window-all-closed', () => {
|
|
||||||
app.quit()
|
|
||||||
})
|
|
||||||
|
|
||||||
app.on('activate', () => {
|
|
||||||
if (app.win === null) {
|
|
||||||
createWindow()
|
|
||||||
} else {
|
|
||||||
app.win.show()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
app.inspect = function () {
|
|
||||||
app.win.toggleDevTools()
|
|
||||||
}
|
|
||||||
|
|
||||||
app.toggleFullscreen = function () {
|
|
||||||
app.win.setFullScreen(!app.win.isFullScreen())
|
|
||||||
}
|
|
||||||
|
|
||||||
app.toggleMenubar = function () {
|
|
||||||
app.win.setMenuBarVisibility(!app.win.isMenuBarVisible())
|
|
||||||
}
|
|
||||||
|
|
||||||
app.toggleVisible = function () {
|
|
||||||
if (process.platform !== 'darwin') {
|
|
||||||
if (!app.win.isMinimized()) { app.win.minimize() } else { app.win.restore() }
|
|
||||||
} else {
|
|
||||||
if (isShown && !app.win.isFullScreen()) { app.win.hide() } else { app.win.show() }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
app.injectMenu = function (menu) {
|
|
||||||
try {
|
|
||||||
Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
|
|
||||||
} catch (err) {
|
|
||||||
console.warn('Cannot inject menu.')
|
|
||||||
}
|
|
||||||
}
|
|
1420
desktop/package-lock.json
generated
1420
desktop/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Ronin",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"main": "main.js",
|
|
||||||
"scripts": {
|
|
||||||
"start": "electron . --disable-gpu",
|
|
||||||
"fix": "standard --fix",
|
|
||||||
"clean": "rm -r ~/Documents/Ronin-darwin-x64/ ; rm -r ~/Documents/Ronin-linux-x64/ ; rm -r ~/Documents/Ronin-win32-x64/ ; echo 'cleaned build location'",
|
|
||||||
"build_osx": "electron-packager . Ronin --platform=darwin --arch=x64 --out ~/Documents/ --overwrite --icon=icon.icns ; echo 'Built for OSX'",
|
|
||||||
"build_linux": "electron-packager . Ronin --platform=linux --arch=x64 --out ~/Documents/ --overwrite --icon=icon.ico ; echo 'Built for LINUX'",
|
|
||||||
"build_win": "electron-packager . Ronin --platform=win32 --arch=x64 --out ~/Documents/ --overwrite --icon=icon.ico ; echo 'Built for WIN'",
|
|
||||||
"build": "npm run clean ; npm run build_osx ; npm run build_linux ; npm run build_win ; npm run add_manual",
|
|
||||||
"add_manual": "cp ../resources/MANUAL.txt ~/Documents/Ronin-darwin-x64/MANUAL.txt ; cp ../resources/MANUAL.txt ~/Documents/Ronin-linux-x64/MANUAL.txt ; cp ../resources/MANUAL.txt ~/Documents/Ronin-win32-x64/MANUAL.txt",
|
|
||||||
"push_osx": "~/Applications/butler push ~/Documents/Ronin-darwin-x64/ hundredrabbits/ronin:osx-64",
|
|
||||||
"push_linux": "~/Applications/butler push ~/Documents/Ronin-linux-x64/ hundredrabbits/ronin:linux-64",
|
|
||||||
"push_win": "~/Applications/butler push ~/Documents/Ronin-win32-x64/ hundredrabbits/ronin:windows-64",
|
|
||||||
"status": "~/Applications/butler status hundredrabbits/ronin",
|
|
||||||
"push": "npm run build ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run status"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"electron": "^8.1.1",
|
|
||||||
"electron-packager": "^14.2.1"
|
|
||||||
},
|
|
||||||
"standard": {
|
|
||||||
"globals": [
|
|
||||||
"localStorage",
|
|
||||||
"DOMParser",
|
|
||||||
"onMessage",
|
|
||||||
"postMessage",
|
|
||||||
"FileReader",
|
|
||||||
"performance",
|
|
||||||
"Worker"
|
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"/node_modules/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<head>
|
|
||||||
<meta charset='UTF-8'>
|
|
||||||
<script type="text/javascript" src="scripts/lib/theme.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/lib/acels.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/lib/lisp.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/lib/source.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/client.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/commander.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/surface.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/library.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="links/main.css"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="links/theme.css"/>
|
|
||||||
<title>Ronin</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script type="text/javascript">
|
|
||||||
const client = new Client()
|
|
||||||
|
|
||||||
client.install(document.body)
|
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
client.start()
|
|
||||||
client.acels.inject('Ronin')
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because one or more lines are too long
@ -1,31 +0,0 @@
|
|||||||
body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_regular",courier,monospace; background:000; -webkit-app-region: drag; -webkit-user-select: none; font-size:12px; transition: background 500ms}
|
|
||||||
|
|
||||||
*:focus {outline: none; }
|
|
||||||
|
|
||||||
#ronin { height: calc(100vh - 60px); width:calc(100vw - 60px); -webkit-app-region: drag; padding: 30px;overflow: hidden; }
|
|
||||||
#ronin #wrapper { overflow: hidden; position: relative; }
|
|
||||||
#ronin #wrapper #commander { z-index: 9000;position: relative;width: calc(50vw - 30px);height: calc(100vh - 60px);-webkit-app-region: no-drag;padding-right: 30px;transition: margin-left 250ms;}
|
|
||||||
#ronin #wrapper #commander textarea { background: none; width: 100%; height: calc(100vh - 105px); resize: none; font-size: 12px;line-height: 15px; padding-right: 15px}
|
|
||||||
#ronin #wrapper #commander #status { position: absolute; bottom: 0px; line-height: 15px; height: 30px; overflow: hidden; width: calc(100% - 75px); padding-left:45px;}
|
|
||||||
#ronin #wrapper #commander #status #run { display: block; width: 26px; height: 26px; position: absolute; top: 0px; border-radius: 15px; left:0px; cursor: pointer; border:2px solid #fff; transition: background-color 250ms, border-color 250ms}
|
|
||||||
#ronin.expand #wrapper #commander { width:100%; }
|
|
||||||
#ronin #surface, #ronin #guide { position: absolute; top:0px; -webkit-user-select: none;-webkit-app-region: no-drag; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><circle cx='10' cy='10' r='1' fill='%23555'></circle></svg>"); background-size: 10px 10px; background-position: -4px -4px; width:100%; height:100%; transition: left 250ms, opacity 250ms; opacity: 1; }
|
|
||||||
|
|
||||||
/* Default */
|
|
||||||
|
|
||||||
#ronin.hidden #wrapper #commander { margin-left:-40vw; }
|
|
||||||
#ronin.hidden #surface, #ronin.hidden #guide { left:0; }
|
|
||||||
|
|
||||||
#ronin #guide.hidden { opacity: 0 }
|
|
||||||
|
|
||||||
#ronin.hidden #wrapper #commander { margin-left:-50vw; }
|
|
||||||
#ronin #surface,#ronin #guide { left:50vw; }
|
|
||||||
|
|
||||||
#ronin #guide { background:none; }
|
|
||||||
#ronin #surface { border-radius: 2px }
|
|
||||||
|
|
||||||
@media (min-width: 720px) {
|
|
||||||
#ronin #wrapper #commander { width:350px; }
|
|
||||||
#ronin.hidden #wrapper #commander { margin-left:-380px; }
|
|
||||||
#ronin #surface,#ronin #guide { left:380px; }
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
* { margin:0;padding:0;border:0;outline:0;text-decoration:none;font-weight:inherit;font-style:inherit;color:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;list-style:none;border-collapse:collapse;border-spacing:0; -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
|
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
1715
index.html
1715
index.html
File diff suppressed because one or more lines are too long
43
links/main.css
Normal file
43
links/main.css
Normal file
File diff suppressed because one or more lines are too long
9
push.sh
Executable file
9
push.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -r 'release'
|
||||||
|
mkdir 'release'
|
||||||
|
cp 'index.html' 'release/index.html'
|
||||||
|
cp 'README.txt' 'release/README.txt'
|
||||||
|
~/Applications/butler push ~/Repositories/Hundredrabbits/Ronin/release hundredrabbits/ronin:main
|
||||||
|
~/Applications/butler status hundredrabbits/ronin
|
||||||
|
rm -r 'release'
|
@ -73,7 +73,7 @@ function Acels (client) {
|
|||||||
for (const cat in cats) {
|
for (const cat in cats) {
|
||||||
text += `\n### ${cat}\n\n`
|
text += `\n### ${cat}\n\n`
|
||||||
for (const item of cats[cat]) {
|
for (const item of cats[cat]) {
|
||||||
text += item.accelerator ? `- \`${item.accelerator.replace('`', 'tilde')}\`: ${item.name}\n` : ''
|
text += item.accelerator ? `- \`${item.accelerator}\`: ${item.name}\n` : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return text.trim()
|
return text.trim()
|
||||||
@ -83,54 +83,10 @@ function Acels (client) {
|
|||||||
const cats = this.sort()
|
const cats = this.sort()
|
||||||
let text = ''
|
let text = ''
|
||||||
for (const cat in cats) {
|
for (const cat in cats) {
|
||||||
text += `\n${cat}\n\n`
|
|
||||||
for (const item of cats[cat]) {
|
for (const item of cats[cat]) {
|
||||||
text += item.accelerator ? `${item.name.padEnd(25, '.')} ${item.accelerator}\n` : ''
|
text += item.accelerator ? `${cat}: ${item.name} | ${item.accelerator}\n` : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return text.trim()
|
return text.trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Electron specifics
|
|
||||||
|
|
||||||
this.inject = (name = 'Untitled') => {
|
|
||||||
const app = require('electron').remote.app
|
|
||||||
const injection = []
|
|
||||||
|
|
||||||
injection.push({
|
|
||||||
label: name,
|
|
||||||
submenu: [
|
|
||||||
{ label: 'About', click: () => { require('electron').shell.openExternal('https://github.com/hundredrabbits/' + name) } },
|
|
||||||
{
|
|
||||||
label: 'Theme',
|
|
||||||
submenu: [
|
|
||||||
{ label: 'Download Themes', click: () => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Themes') } },
|
|
||||||
{ label: 'Open Theme', click: () => { client.theme.open() } },
|
|
||||||
{ label: 'Reset Theme', accelerator: 'CmdOrCtrl+Escape', click: () => { client.theme.reset() } }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{ label: 'Fullscreen', accelerator: 'CmdOrCtrl+Enter', click: () => { app.toggleFullscreen() } },
|
|
||||||
{ label: 'Hide', accelerator: 'CmdOrCtrl+H', click: () => { app.toggleVisible() } },
|
|
||||||
{ label: 'Toggle Menubar', accelerator: 'Alt+H', click: () => { app.toggleMenubar() } },
|
|
||||||
{ label: 'Inspect', accelerator: 'CmdOrCtrl+Tab', click: () => { app.inspect() } },
|
|
||||||
{ role: 'quit' }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
const sorted = this.sort()
|
|
||||||
for (const cat of Object.keys(sorted)) {
|
|
||||||
const submenu = []
|
|
||||||
for (const option of sorted[cat]) {
|
|
||||||
if (option.role) {
|
|
||||||
submenu.push({ role: option.role })
|
|
||||||
} else if (option.type) {
|
|
||||||
submenu.push({ type: option.type })
|
|
||||||
} else {
|
|
||||||
submenu.push({ label: option.name, accelerator: option.accelerator, click: option.downfn })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
injection.push({ label: cat, submenu: submenu })
|
|
||||||
}
|
|
||||||
app.injectMenu(injection)
|
|
||||||
}
|
|
||||||
}
|
}
|
48
scripts/lib/build.js
Normal file
48
scripts/lib/build.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const libs = fs.readdirSync('./scripts/lib').filter((file) => { return file.indexOf('.js') > 0 && file !== 'build.js' })
|
||||||
|
const scripts = fs.readdirSync('./scripts').filter((file) => { return file.indexOf('.js') > 0 })
|
||||||
|
const styles = fs.readdirSync('./links').filter((file) => { return file.indexOf('.css') > 0 })
|
||||||
|
const id = process.cwd().split('/').slice(-1)[0]
|
||||||
|
|
||||||
|
function cleanup (txt) {
|
||||||
|
const lines = txt.split('\n')
|
||||||
|
let output = ''
|
||||||
|
for (const line of lines) {
|
||||||
|
if (line.trim() === '') { continue }
|
||||||
|
if (line.trim().substr(0, 2) === '//') { continue }
|
||||||
|
if (line.indexOf('/*') > -1 && line.indexOf('*/') > -1) { continue }
|
||||||
|
output += line + '\n'
|
||||||
|
}
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
|
const wrapper = `
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>${id}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
${libs.reduce((acc, item) => { return `${acc}// Including Library ${item}\n\n${fs.readFileSync('./scripts/lib/' + item, 'utf8')}\n` }, '')}
|
||||||
|
${scripts.reduce((acc, item) => { return `${acc}// Including Script ${item}\n\n${fs.readFileSync('./scripts/' + item, 'utf8')}\n` }, '')}
|
||||||
|
const client = new Client()
|
||||||
|
client.install(document.body)
|
||||||
|
window.addEventListener('load', () => {
|
||||||
|
client.start()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
${styles.reduce((acc, item) => { return `${acc}/* Including Style ${item} */ \n\n${fs.readFileSync('./links/' + item, 'utf8')}\n` }, '')}
|
||||||
|
</style>
|
||||||
|
</body>
|
||||||
|
</html>`
|
||||||
|
|
||||||
|
fs.writeFileSync('index.html', cleanup(wrapper))
|
||||||
|
|
||||||
|
console.log(`Built ${id}`)
|
Loading…
x
Reference in New Issue
Block a user