Skip to content

Commit a2b479e

Browse files
committed
Let there be light!
0 parents  commit a2b479e

File tree

133 files changed

+18487
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+18487
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/*
2+
!dist/.gitkeep
3+
node_modules
4+
public/scripts.min.js
5+
public/styles.min.css

Gulpfile.js

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
const cleancss = require('gulp-clean-css')
2+
const concat = require('gulp-concat')
3+
const electron = require('gulp-run-electron')
4+
const footer = require('gulp-footer')
5+
const gulp = require('gulp')
6+
const header = require('gulp-header')
7+
const gulpif = require('gulp-if')
8+
const iife = require('gulp-iife')
9+
const merge = require('merge-stream')
10+
const package = require('./package.json')
11+
const packager = require('electron-packager')
12+
const rename = require('gulp-rename')
13+
const serve = require('gulp-serve')
14+
const uglify = require('gulp-uglify-es').default
15+
const zip = require('gulp-zip')
16+
17+
const argv = require('yargs').argv,
18+
isDebug = argv.debug === true
19+
20+
gulp.task('build-css', () => {
21+
return gulp.src(
22+
getCss()
23+
).pipe(
24+
concat('styles.min.css')
25+
).pipe(
26+
gulpif(!isDebug, cleancss())
27+
).pipe(
28+
gulp.dest('public')
29+
)
30+
})
31+
32+
gulp.task('build-js', () => {
33+
return gulp.src(
34+
getJs()
35+
).pipe(
36+
concat('scripts.min.js')
37+
).pipe(
38+
footer(
39+
`;app.version=()=>'${package.version + (isDebug ? '-debug' : '')}';`
40+
)
41+
).pipe(
42+
gulpif(!isDebug, iife(), header("'use strict';\n\n"))
43+
).pipe(
44+
gulp.dest('public')
45+
).pipe(
46+
gulpif(!isDebug, uglify())
47+
).pipe(
48+
gulp.dest('public')
49+
)
50+
})
51+
52+
gulp.task('build', gulp.series('build-css', 'build-js'))
53+
54+
gulp.task('dist-electron', async () => {
55+
// Builds only for current platform, e.g. must build separately on Windows and Linux
56+
const platforms = [process.platform]
57+
58+
const paths = await packager({
59+
arch: 'x64',
60+
asar: true,
61+
dir: '.',
62+
icon: 'assets/icon/favicon',
63+
ignore: [
64+
'.gitignore',
65+
'dist',
66+
'docs',
67+
'Gulpfile.js',
68+
'node_modules',
69+
'package-lock.json',
70+
'README.md',
71+
'src',
72+
],
73+
out: 'dist',
74+
overwrite: true,
75+
platform: platforms,
76+
})
77+
78+
// XXX: Archives have no root directory
79+
paths.forEach((path) => {
80+
const build = gulp.src(path + '/**/*')
81+
82+
const manual = gulp.src([
83+
'public/font/*',
84+
'public/manual.html'
85+
], {base: 'public'}).pipe(
86+
rename((path) => {
87+
path.dirname = '/documentation/' + path.dirname
88+
})
89+
)
90+
91+
merge(build, manual).pipe(
92+
zip(path.replace('dist\\', '') + '.zip')
93+
).pipe(
94+
gulp.dest('dist')
95+
)
96+
})
97+
})
98+
99+
gulp.task('dist-html5', () => {
100+
// XXX: Archive has no root directory
101+
return gulp.src([
102+
'public/favicon.png',
103+
'public/font/*.woff',
104+
'public/index.html',
105+
'public/manual.html',
106+
'public/scripts.min.js',
107+
'public/styles.min.css',
108+
], {base: 'public'}).pipe(
109+
zip(package.name + '-html5' + '.zip')
110+
).pipe(
111+
gulp.dest('dist')
112+
)
113+
})
114+
115+
gulp.task('dist', gulp.series('build', 'dist-electron', 'dist-html5'))
116+
117+
gulp.task('electron', () => {
118+
return gulp.src('.').pipe(
119+
electron()
120+
)
121+
})
122+
123+
gulp.task('electron-rebuild', gulp.series('build', 'electron'))
124+
125+
gulp.task('serve', serve('public'))
126+
127+
gulp.task('watch', () => {
128+
gulp.watch(['src/**'], gulp.series('build'))
129+
})
130+
131+
gulp.task('dev', gulp.parallel('serve', 'watch'))
132+
133+
function getCss() {
134+
const srcs = [
135+
'src/css/reset.css',
136+
'src/css/main.css',
137+
'src/css/utility/*.css',
138+
'src/css/component/*.css',
139+
'src/css/*.css',
140+
'src/css/**/*.css',
141+
]
142+
143+
return srcs
144+
}
145+
146+
function getJs() {
147+
return [
148+
...getEngineJs(),
149+
...getContentJs(),
150+
...getAppJs(),
151+
'src/js/main.js',
152+
]
153+
}
154+
155+
function getAppJs() {
156+
const srcs = [
157+
'src/js/app.js',
158+
'src/js/app/screen/base.js',
159+
'src/js/app/utility/*.js',
160+
'src/js/app/*.js',
161+
'src/js/app/**/*.js',
162+
]
163+
164+
// Hide debug code
165+
if (!isDebug) {
166+
srcs.push(
167+
'!src/js/app/debug.js',
168+
'!src/js/app/debug/*.js',
169+
'!src/js/app/debug/**/*.js',
170+
)
171+
}
172+
173+
return srcs
174+
}
175+
176+
function getContentJs() {
177+
const srcs = [
178+
'src/js/content.js',
179+
'src/js/content/tool/*.js',
180+
'src/js/content/tool/**/*.js',
181+
'src/js/content/*.js',
182+
'src/js/content/**/*.js',
183+
]
184+
185+
return srcs
186+
}
187+
188+
function getEngineJs() {
189+
return [
190+
'node_modules/syngen/dist/syngen.js',
191+
'src/js/engine.js',
192+
]
193+
}

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or
4+
distribute this software, either in source code form or as a compiled
5+
binary, for any purpose, commercial or non-commercial, and by any
6+
means.
7+
8+
In jurisdictions that recognize copyright laws, the author or authors
9+
of this software dedicate any and all copyright interest in the
10+
software to the public domain. We make this dedication for the benefit
11+
of the public at large and to the detriment of our heirs and
12+
successors. We intend this dedication to be an overt act of
13+
relinquishment in perpetuity of all present and future rights to this
14+
software under copyright law.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.
23+
24+
For more information, please refer to <https://unlicense.org>

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Project Ephemera
2+
Unearth a forgotten game console in this submission to [SYNTH jam](https://itch.io/jam/synth-jam).
3+
4+
## Getting started
5+
To get started, please use [npm](https://nodejs.org) to install the required dependencies:
6+
```sh
7+
npm install
8+
```
9+
10+
### Common tasks
11+
Common tasks have been automated with [Gulp](https://gulpjs.com):
12+
13+
#### Build once
14+
```sh
15+
gulp build
16+
```
17+
18+
#### Build continuously
19+
```sh
20+
gulp watch
21+
```
22+
23+
#### Create distributables
24+
```sh
25+
gulp dist
26+
```
27+
28+
#### Open in Electron
29+
```sh
30+
gulp electron
31+
```
32+
33+
#### Build and open in Electron
34+
```sh
35+
gulp electron-build
36+
```
37+
38+
### Start web server
39+
```sh
40+
gulp serve
41+
```
42+
43+
### Start web server and build continuously
44+
```sh
45+
gulp dev
46+
```
47+
48+
#### Command line flags
49+
| Flag | Description |
50+
| - | - |
51+
| `--debug` | Suppresses minification. |

assets/icon/favicon.ico

167 KB
Binary file not shown.

assets/icon/favicon.png

15.3 KB
Loading

assets/itch/banner.png

60 KB
Loading

assets/itch/cover.png

62.7 KB
Loading

assets/screenshots/01.png

1.74 MB
Loading

assets/screenshots/02.png

2.69 MB
Loading

0 commit comments

Comments
 (0)