I have an Electron app with Typescript. The structure of my project is as follows: Project Structure
In /src is my code allocated, and in /www is where my compiled (transpiled, in fact) code is allocated.
I made a toy exercice with gulp-livereload based on this example: Live reload for electron application
And it works fine! But in my project is not the case.
In my index.html I have the following line added:
<script src="http://localhost:35729/livereload.js"></script>
And this is my gulpfile.js:
gulp.task("sass", function() {
return gulp.src(paths.sass)
.pipe(sass())
.on("error", sass.logError)
.pipe(gulp.dest(outDir))
.pipe(cleanCSS({
compatibility: "ie8"
}))
.pipe(rename({
extname: ".min.css"
}))
.pipe(gulp.dest(outDir))
.pipe(livereload());
});
gulp.task("watch", ["compile"], function() {
livereload.listen();
gulp.watch(["./src/**/*.scss", "./src/**/*.ts", "!./src/lib/**"], ["clean-min-sources"]);
gulp.watch(["./src/**/*", "!./src/**/*.ts", "!./src/**/*.scss"], ["copy-assets"]);
gulp.watch(["./src/**/*.*"]);
});
What's the difference between my project and my example?
Thanks in advance!