mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-21 15:26:17 -04:00
first working version
This commit is contained in:
parent
f1ad168e40
commit
bda1a15750
24 changed files with 543 additions and 206 deletions
10
gulpfile.js
10
gulpfile.js
|
@ -16,6 +16,9 @@ var packageJson = require('./package.json');
|
|||
var crypto = require('crypto');
|
||||
var ensureFiles = require('./tasks/ensure-files.js');
|
||||
var inlinesource = require('gulp-inline-source');
|
||||
var proxy = require('proxy-middleware');
|
||||
var url = require('url');
|
||||
var minifyHTML = require('gulp-minify-html');
|
||||
|
||||
// var ghPages = require('gulp-gh-pages');
|
||||
|
||||
|
@ -190,6 +193,7 @@ gulp.task('vulcanize', function() {
|
|||
inlineCss: true,
|
||||
inlineScripts: true
|
||||
}))
|
||||
.pipe(minifyHTML({ empty: true }))
|
||||
.pipe(gulp.dest(dist('elements')))
|
||||
.pipe($.size({
|
||||
title: 'vulcanize'
|
||||
|
@ -240,6 +244,10 @@ gulp.task('clean', function() {
|
|||
|
||||
// Watch files for changes & reload
|
||||
gulp.task('serve', ['styles', 'elements', 'images'], function() {
|
||||
var peerjsProxy = url.parse('http://localhost:3002/peerjs');
|
||||
peerjsProxy.route = '/peerjs';
|
||||
var websocketProxy = url.parse('http://localhost:3002/binary');
|
||||
websocketProxy.route = '/binary';
|
||||
browserSync({
|
||||
port: 5000,
|
||||
notify: false,
|
||||
|
@ -259,7 +267,7 @@ gulp.task('serve', ['styles', 'elements', 'images'], function() {
|
|||
// https: true,
|
||||
server: {
|
||||
baseDir: ['.tmp', 'app'],
|
||||
middleware: [historyApiFallback()]
|
||||
middleware: [proxy(peerjsProxy),proxy(websocketProxy), historyApiFallback()]
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue