mirror of https://github.com/Trivernis/whooshy.git
Added buildfile
- added gulpfile as buildfile - removed install script - removed riddle style - removed riddle viewtypescript
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
|
|
File diff suppressed because it is too large
Load Diff
@ -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
|
|
@ -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…
Reference in New Issue