]> prime8.dev >> repos - ttyd.git/commitdiff
html: add .editorconfig
authorShuanglei Tao <tsl0922@gmail.com>
Wed, 2 May 2018 15:49:18 +0000 (23:49 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Wed, 2 May 2018 15:49:18 +0000 (23:49 +0800)
html/.editorconfig [new file with mode: 0644]
html/README.md
html/gulpfile.js
html/package.json
html/webpack.config.js
html/webpack.dev.js
html/webpack.prod.js

diff --git a/html/.editorconfig b/html/.editorconfig
new file mode 100644 (file)
index 0000000..c3f6353
--- /dev/null
@@ -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
index 3ed619d2e1351ccbade95c81058c7fef45efb537..8e48ca661f269f31c99aebc766682ef8df9c7a3c 100644 (file)
@@ -9,4 +9,4 @@ install [Yarn](https://yarnpkg.com), and run: `yarn install`.
 
 ## Publish
 
-Run `yarn run build`, this will compile the inlined html to `../src/index.html`.
\ No newline at end of file
+Run `yarn run build`, this will compile the inlined html to `../src/index.html`.
index 0b8e4d59b951be7e1f3f5cbbaef52d787312768a..dcdbbe12eeeb3cd6fcc2aefb2e726ca98d002071 100644 (file)
@@ -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());
 });
 
index 6172eecaf224cc07122c2ed8eeaf6f4038ddf55f..af868440f86da41db2fd7c9c567a88a58cf69f34 100644 (file)
@@ -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"
+    }
 }
index dafadabc94b68972c85459dc1cdd805c55b052b2..0c2e0df674d8f1eaa17d594cb9a461274fcda1e4 100644 (file)
@@ -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',
         })
     ]
 }
\ No newline at end of file
index 5a1a089ee638bb3d37063ad584b244e0b6af4065..6174f2a579dfa136f1506f6b0dac3d92cec04b0a 100644 (file)
@@ -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));
+        }
     }
-});
\ No newline at end of file
+});
index 40d61eda8db9c7ce6caa57eb6a6b935d816d2be0..d1d01cddaf2d1cfdab086b1dfe49fa7f635e5f99 100644 (file)
@@ -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()
-       ]
-});
\ No newline at end of file
+    mode: 'production',
+    plugins: [
+        new HtmlWebpackPlugin({
+            inlineSource: '.(js|css)$',
+            template: 'index.html'
+        }),
+        new HtmlWebpackInlineSourcePlugin()
+    ]
+});