aboutsummaryrefslogtreecommitdiff
path: root/src_doit/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src_doit/__init__.py')
-rw-r--r--src_doit/__init__.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/src_doit/__init__.py b/src_doit/__init__.py
index 2639ffe..1120e13 100644
--- a/src_doit/__init__.py
+++ b/src_doit/__init__.py
@@ -4,10 +4,11 @@ import tempfile
from hat import json
from hat.doit import common
+from hat.doit.js import (ESLintConf,
+ run_eslint)
from hat.doit.py import (build_wheel,
run_pytest,
run_flake8)
-from hat.doit.js import run_eslint
from hat.doit.c import get_task_clang_format
from .c import * # NOQA
@@ -74,7 +75,7 @@ def task_check():
"""Check"""
return {'actions': [(run_flake8, [src_py_dir]),
(run_flake8, [pytest_dir]),
- (run_eslint, [src_js_dir])],
+ (run_eslint, [src_js_dir, ESLintConf.TS])],
'task_dep': ['node_modules']}
@@ -98,7 +99,7 @@ def task_ui():
tmpdir = Path(tmpdir)
config_path = tmpdir / 'webpack.config.js'
config_path.write_text(_webpack_conf.format(
- src_path=(src_js_dir / 'main.js').resolve(),
+ src_path=(src_js_dir / 'main.ts').resolve(),
dst_dir=ui_dir.resolve()))
subprocess.run([str(node_modules_dir / '.bin/webpack'),
'--config', str(config_path),
@@ -158,9 +159,16 @@ module.exports = {{
options: {{sourceMap: true}}
}}
]
+ }},
+ {{
+ test: /\.ts$/,
+ use: 'ts-loader'
}}
]
}},
+ resolve: {{
+ extensions: ['.ts', '.js']
+ }},
watchOptions: {{
ignored: /node_modules/
}},