made gulp output to dist/

This commit is contained in:
typer 2020-11-02 03:19:24 -08:00
parent 3fc81ee2a7
commit 18de7cccd5
3 changed files with 9 additions and 9 deletions

View file

@ -38,7 +38,7 @@
## Building and Running
1. Run `npm install` in the project root directory to install dependencies.
1. Run `npm run start:dev` to start a local dev server on port 5000. It will watch for changes and rebuild when you edit files in `src/` or `static/`. Use ctrl+c to stop it.
1. Run `npm run start:dev` to start a local dev server on port 5000. It will watch for changes and rebuild when you edit files in `src/` or `public/`. Use ctrl+c to stop it.
- Run `firebase use default` if you run into any errors for this.
## Standards and Conventions

View file

@ -1,6 +1,6 @@
{
"hosting": {
"public": "public",
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{

View file

@ -20,27 +20,27 @@ const gulpSrc = [
];
task("cat", function () {
return src(gulpSrc).pipe(concat("monkeytype.js")).pipe(dest("./public/js"));
return src(gulpSrc).pipe(concat("monkeytype.js")).pipe(dest("./dist/js"));
});
task("sass", function () {
return src("./src/sass/*.scss")
.pipe(sass({ outputStyle: "compressed" }).on("error", sass.logError))
.pipe(dest("public/css"));
.pipe(dest("dist/css"));
});
task("dist", function () {
return src("./static/**/*").pipe(dest("./public/"));
task("static", function () {
return src("./public/**/*").pipe(dest("./dist/"));
});
task("clean", function () {
return src("./public/", { allowEmpty: true }).pipe(vinylPaths(del));
return src("./dist/", { allowEmpty: true }).pipe(vinylPaths(del));
});
task("build", series("dist", "sass", "cat"));
task("build", series("static", "sass", "cat"));
task("watch", function () {
watch(["./static/**/*", "./src/**/*"], series("build"));
watch(["./public/**/*", "./src/**/*"], series("build"));
});
task("rebuild", series("clean", "build"));