mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-24 04:34:19 +01:00
html: add .editorconfig
This commit is contained in:
11
html/.editorconfig
Normal file
11
html/.editorconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -1,9 +1,9 @@
|
||||
const gulp = require('gulp'),
|
||||
clean = require('gulp-clean'),
|
||||
clean = require('gulp-clean'),
|
||||
inlinesource = require('gulp-inline-source');
|
||||
|
||||
gulp.task('clean', function () {
|
||||
return gulp.src('dist', {read: false})
|
||||
return gulp.src('dist', {read: false})
|
||||
.pipe(clean());
|
||||
});
|
||||
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
{
|
||||
"name": "ttyd",
|
||||
"version": "1.1.0",
|
||||
"description": "Share your terminal over the web",
|
||||
"main": "js/app.js",
|
||||
"repository": {
|
||||
"url": "git@github.com:tsl0922/ttyd.git",
|
||||
"type": "git"
|
||||
},
|
||||
"author": "Shuanglei Tao <tsl0922@gmail.com>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.prod.js && gulp",
|
||||
"clean": "gulp clean",
|
||||
"start": "webpack-serve webpack.dev.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"bulma": "^0.6.1",
|
||||
"core-js": "^2.5.3",
|
||||
"fast-text-encoding": "^1.0.0",
|
||||
"xterm": "^3.2.0",
|
||||
"zmodem.js": "^0.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"copy-webpack-plugin": "^4.5.1",
|
||||
"css-loader": "^0.28.8",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-inline-source": "^3.1.0",
|
||||
"html-webpack-inline-source-plugin": "^0.0.10",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"http-proxy-middleware": "^0.18.0",
|
||||
"koa-connect": "^2.0.1",
|
||||
"mini-css-extract-plugin": "^0.4.0",
|
||||
"node-sass": "^4.7.2",
|
||||
"sass-loader": "^6.0.6",
|
||||
"style-loader": "^0.19.1",
|
||||
"webpack": "^4.6.0",
|
||||
"webpack-cli": "^2.1.2",
|
||||
"webpack-merge": "^4.1.2",
|
||||
"webpack-serve": "^0.3.2"
|
||||
}
|
||||
"name": "ttyd",
|
||||
"version": "1.1.0",
|
||||
"description": "Share your terminal over the web",
|
||||
"main": "js/app.js",
|
||||
"repository": {
|
||||
"url": "git@github.com:tsl0922/ttyd.git",
|
||||
"type": "git"
|
||||
},
|
||||
"author": "Shuanglei Tao <tsl0922@gmail.com>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.prod.js && gulp",
|
||||
"clean": "gulp clean",
|
||||
"start": "webpack-serve webpack.dev.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"bulma": "^0.6.1",
|
||||
"core-js": "^2.5.3",
|
||||
"fast-text-encoding": "^1.0.0",
|
||||
"xterm": "^3.2.0",
|
||||
"zmodem.js": "^0.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"copy-webpack-plugin": "^4.5.1",
|
||||
"css-loader": "^0.28.8",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-inline-source": "^3.1.0",
|
||||
"html-webpack-inline-source-plugin": "^0.0.10",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"http-proxy-middleware": "^0.18.0",
|
||||
"koa-connect": "^2.0.1",
|
||||
"mini-css-extract-plugin": "^0.4.0",
|
||||
"node-sass": "^4.7.2",
|
||||
"sass-loader": "^6.0.6",
|
||||
"style-loader": "^0.19.1",
|
||||
"webpack": "^4.6.0",
|
||||
"webpack-cli": "^2.1.2",
|
||||
"webpack-merge": "^4.1.2",
|
||||
"webpack-serve": "^0.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,34 +9,34 @@ module.exports = {
|
||||
filename: devMode ? '[name].js' : '[name].[hash].js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules\/(?!zmodem.js\/)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['env']
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules\/(?!zmodem.js\/)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['env']
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.s?[ac]ss$/,
|
||||
use: [
|
||||
devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
|
||||
'css-loader',
|
||||
'sass-loader',
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.s?[ac]ss$/,
|
||||
use: [
|
||||
devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
|
||||
'css-loader',
|
||||
'sass-loader',
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
{from: 'favicon.png', to: '.' }
|
||||
{from: 'favicon.png', to: '.' }
|
||||
], {}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: devMode ? '[name].css' : '[name].[hash].css',
|
||||
chunkFilename: devMode ? '[id].css' : '[id].[hash].css',
|
||||
filename: devMode ? '[name].css' : '[name].[hash].css',
|
||||
chunkFilename: devMode ? '[id].css' : '[id].[hash].css',
|
||||
})
|
||||
]
|
||||
}
|
||||
@@ -6,27 +6,27 @@ const config = require('./webpack.config.js');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = merge(config, {
|
||||
devtool: 'source-map',
|
||||
mode: 'development',
|
||||
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));
|
||||
}
|
||||
devtool: 'source-map',
|
||||
mode: 'development',
|
||||
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));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -5,12 +5,12 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
|
||||
|
||||
module.exports = merge(config, {
|
||||
mode: 'production',
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
inlineSource: '.(js|css)$',
|
||||
template: 'index.html'
|
||||
}),
|
||||
new HtmlWebpackInlineSourcePlugin()
|
||||
]
|
||||
mode: 'production',
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
inlineSource: '.(js|css)$',
|
||||
template: 'index.html'
|
||||
}),
|
||||
new HtmlWebpackInlineSourcePlugin()
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user