-
-
Notifications
You must be signed in to change notification settings - Fork 845
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
3,077 additions
and
4,955 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
const gulp = require('gulp'), | ||
clean = require('gulp-clean'), | ||
inlinesource = require('gulp-inline-source'); | ||
const { src, dest, task } = require("gulp"); | ||
const clean = require('gulp-clean'); | ||
const inlinesource = require('gulp-inline-source'); | ||
|
||
gulp.task('clean', function () { | ||
return gulp.src('dist', {read: false}) | ||
task('clean', () => { | ||
return src('dist', {read: false, allowEmpty: true}) | ||
.pipe(clean()); | ||
}); | ||
|
||
gulp.task('inlinesource', function () { | ||
return gulp.src('dist/index.html') | ||
task('default', () => { | ||
return src('dist/index.html') | ||
.pipe(inlinesource()) | ||
.pipe(gulp.dest('../src/')); | ||
}); | ||
|
||
gulp.task('default', ['inlinesource']); | ||
.pipe(dest('../src/')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,24 @@ | ||
const path = require('path'); | ||
const merge = require('webpack-merge'); | ||
const convert = require('koa-connect'); | ||
const proxy = require('http-proxy-middleware'); | ||
const config = require('./webpack.config.js'); | ||
|
||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
|
||
module.exports = merge(config, { | ||
mode: 'development', | ||
devServer: { | ||
contentBase: path.join(__dirname, 'dist'), | ||
compress: true, | ||
port: 9000, | ||
proxy: [{ | ||
context: ['/auth_token.js', '/ws'], | ||
target: 'http://localhost:7681', | ||
ws: true | ||
}] | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: 'index.html', | ||
}), | ||
], | ||
serve: { | ||
content: __dirname + '/dist', | ||
add: (app, middleware, options) => { | ||
var ttydProxy = proxy( | ||
[ | ||
'/ws', | ||
'/auth_token.js', | ||
], | ||
{ | ||
target: 'http://127.0.0.1:7681', | ||
ws: true, | ||
} | ||
); | ||
app.use(convert(ttydProxy)); | ||
}, | ||
} | ||
template: 'index.html' | ||
}) | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.