mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(compiler): watch ts file (#4693)
This commit is contained in:
parent
79820f7f45
commit
819efae7c8
@ -134,7 +134,10 @@ tasks.buildExample = gulp.series(
|
|||||||
.pipe(gulp.dest(`${exampleDistDir}/@vant/icons`)),
|
.pipe(gulp.dest(`${exampleDistDir}/@vant/icons`)),
|
||||||
() => {
|
() => {
|
||||||
const appJson = JSON.parse(fs.readFileSync(exampleAppJsonPath));
|
const appJson = JSON.parse(fs.readFileSync(exampleAppJsonPath));
|
||||||
appJson.pages.forEach((path) => {
|
const excludePages = ['pages/dashboard/index'];
|
||||||
|
appJson.pages
|
||||||
|
.filter((page) => page.indexOf(excludePages) === -1)
|
||||||
|
.forEach((path) => {
|
||||||
const component = path.replace(/(pages\/|\/index)/g, '');
|
const component = path.replace(/(pages\/|\/index)/g, '');
|
||||||
const writeFiles = [
|
const writeFiles = [
|
||||||
{
|
{
|
||||||
@ -163,6 +166,7 @@ tasks.buildExample = gulp.series(
|
|||||||
gulp.watch(`${src}/**/*.less`, lessCompiler(exampleDistDir));
|
gulp.watch(`${src}/**/*.less`, lessCompiler(exampleDistDir));
|
||||||
gulp.watch(`${src}/**/*.wxml`, copier(exampleDistDir, 'wxml'));
|
gulp.watch(`${src}/**/*.wxml`, copier(exampleDistDir, 'wxml'));
|
||||||
gulp.watch(`${src}/**/*.wxs`, copier(exampleDistDir, 'wxs'));
|
gulp.watch(`${src}/**/*.wxs`, copier(exampleDistDir, 'wxs'));
|
||||||
|
gulp.watch(`${src}/**/*.ts`, tsCompiler(exampleDistDir, exampleConfig));
|
||||||
gulp.watch(`${src}/**/*.json`, copier(exampleDistDir, 'json'));
|
gulp.watch(`${src}/**/*.json`, copier(exampleDistDir, 'json'));
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user