mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
web: remove unnecessary template copying build step (#7490)
This commit is contained in:
parent
99e79f7619
commit
e78ab0ffd9
4 changed files with 16 additions and 50 deletions
|
|
@ -1,19 +1,15 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8" />
|
||||
<title>mitmproxy</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href=".{{ static_url('vendor.css') }}" />
|
||||
<link rel="stylesheet" href=".{{ static_url('app.css') }}" />
|
||||
<link
|
||||
rel="icon"
|
||||
href=".{{ static_url('images/favicon.ico') }}"
|
||||
type="image/x-icon"
|
||||
/>
|
||||
<script src=".{{ static_url('app.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mitmproxy"></div>
|
||||
</body>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>mitmproxy</title>
|
||||
<link rel="icon" href=".{{ static_url('images/favicon.ico') }}" type="image/x-icon"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href=".{{ static_url('vendor.css') }}" />
|
||||
<link rel="stylesheet" href=".{{ static_url('app.css') }}" />
|
||||
<script src=".{{ static_url('app.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mitmproxy"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
|
|||
)
|
||||
|
||||
def test_index(self):
|
||||
response: httpclient.HTTPResponse = self.fetch("/")
|
||||
response = self.fetch("/")
|
||||
assert response.code == 200
|
||||
assert '"/' not in str(
|
||||
response.body
|
||||
assert (
|
||||
b'="/' not in response.body
|
||||
), "HTML content should not contain root-relative paths"
|
||||
|
||||
def test_filter_help(self):
|
||||
|
|
|
|||
|
|
@ -82,14 +82,6 @@ function copy() {
|
|||
.pipe(gulp.dest("../mitmproxy/tools/web/static"));
|
||||
}
|
||||
|
||||
const template_src = "src/templates/*";
|
||||
|
||||
function templates() {
|
||||
return gulp
|
||||
.src(template_src, { base: "src/" })
|
||||
.pipe(gulp.dest("../mitmproxy/tools/web"));
|
||||
}
|
||||
|
||||
const peg_src = "src/js/filt/*.peg";
|
||||
|
||||
function peg() {
|
||||
|
|
@ -114,7 +106,6 @@ const dev = gulp.parallel(
|
|||
styles_app_dev,
|
||||
peg,
|
||||
scripts_dev,
|
||||
templates,
|
||||
);
|
||||
|
||||
const prod = gulp.parallel(
|
||||
|
|
@ -123,7 +114,6 @@ const prod = gulp.parallel(
|
|||
styles_app_prod,
|
||||
peg,
|
||||
scripts_prod,
|
||||
templates,
|
||||
);
|
||||
|
||||
exports.dev = dev;
|
||||
|
|
@ -134,7 +124,6 @@ exports.default = function watch() {
|
|||
gulp.watch(["src/css/vendor*"], opts, styles_vendor_dev);
|
||||
gulp.watch(["src/css/**"], opts, styles_app_dev);
|
||||
gulp.watch(["src/js/**"], opts, scripts_dev);
|
||||
gulp.watch(template_src, opts, templates);
|
||||
gulp.watch(peg_src, opts, peg);
|
||||
gulp.watch(copy_src, opts, copy);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8" />
|
||||
<title>mitmproxy</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href=".{{ static_url('vendor.css') }}" />
|
||||
<link rel="stylesheet" href=".{{ static_url('app.css') }}" />
|
||||
<link
|
||||
rel="icon"
|
||||
href=".{{ static_url('images/favicon.ico') }}"
|
||||
type="image/x-icon"
|
||||
/>
|
||||
<script src=".{{ static_url('app.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mitmproxy"></div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue