Added buildfile

- added gulpfile as buildfile
- removed install script
- removed riddle style
- removed riddle view
typescript
Trivernis 5 years ago
parent 059721218a
commit 03465795b1

@ -0,0 +1,48 @@
const {src, dest, watch, series, task} = require('gulp');
const sass = require('gulp-sass');
const ts = require('gulp-typescript');
const minify = require('gulp-minify');
const del = require('delete');
function clearDist(cb) {
del('dist/*', cb);
}
function compileTypescript() {
let tsProject = ts.createProject('tsconfig.json');
let tsResult = tsProject.src().pipe(tsProject());
return tsResult
//.pipe(minify())
.pipe(dest('dist'));
}
function minifyJs() {
return src('src/public/javascripts/**/*.js')
.pipe(minify({
ext: {
src: '-debug.js',
min: '.js'
}
}))
.pipe(dest('dist/public/javascripts'));
}
function compileSass() {
return src('src/public/stylesheets/sass/**/style.sass')
.pipe(sass().on('error', sass.logError))
.pipe(dest('dist/public/stylesheets'));
}
function moveRemaining() {
return src(['src/**/*', '!src/**/*.ts', '!src/**/*.sass', '!src/**/*.js'])
.pipe(dest('dist'));
}
task('default', series(clearDist, compileTypescript, minifyJs, compileSass, moveRemaining));
task('watch', () => {
watch('src/public/stylesheets/sass/**/*.sass', compileSass);
watch('**/*.js', minifyJs);
watch('**/*.ts', compileTypescript);
watch(['src/**/*', '!src/**/*.ts', '!src/**/*.sass', '!src/**/*.js'], moveRemaining);
});

@ -1,5 +0,0 @@
#!/usr/bin/env bash
npm i
git clone https://github.com/trivernis/reddit-riddle ./scripts/reddit-riddle
pip3 install -r ./scripts/reddit-riddle/requirements.txt
mkdir tmp

1430
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -14,6 +14,7 @@
"connect-pg-simple": "5.0.0",
"cookie-parser": "1.4.4",
"debug": "4.1.1",
"delete": "^1.1.0",
"express": "4.17.1",
"express-compile-sass": "latest",
"express-graphql": "0.9.0",
@ -23,6 +24,7 @@
"fs-extra": "8.1.0",
"graphql": "14.4.2",
"graphql-import": "0.7.1",
"gulp-minify": "^3.1.0",
"http-errors": "1.7.3",
"js-yaml": "latest",
"markdown-it": "9.0.1",
@ -58,7 +60,10 @@
"eslint-plugin-promise": "4.2.1",
"standard": "13.1.0",
"tsc": "^1.20150623.0",
"typescript": "^3.5.3"
"typescript": "^3.5.3",
"gulp": "^4.0.2",
"gulp-sass": "^4.0.2",
"gulp-typescript": "^5.0.1"
},
"eslintConfig": {
"parserOptions": {

@ -1,22 +0,0 @@
@import ../mixins
@import ../vars
#download-list
margin: 1rem 0
.download-container
@include default-element
display: inline-block
margin: 1rem
padding: 1rem
.subredditName
font-weight: bold
a
text-decoration: none
color: $primarySurface
#submit-download
margin: 0 1rem
#subreddit-input
margin: 0 1rem

@ -55,6 +55,9 @@ class BingoRoute extends Route {
return await {
player: () => {
return playerId;
},
mutateLobby: async ({id}) => {
throw new Error('Not implemented');
}
};
}

@ -1,11 +0,0 @@
html
head
title= title
include includes/head
script(type='text/javascript', src='/javascripts/riddle-web.js')
link(rel='stylesheet', href='/sass/riddle/style.sass')
body
h1 Riddle Reddit downloader
input(type='text' placeholder='subreddit' id='subreddit-input')
button(id='submit-download' onclick='submitDownload()') Download
div(id='download-list')
Loading…
Cancel
Save