Skip to content

Commit

Permalink
chore: remove gulp from build process where possible
Browse files Browse the repository at this point in the history
This makes builds a bit faster because we don't need to re-compile
TypeScript in a few places, and overall sheds some dependencies and cruft.

NOTE: I changed the current `tsc` script in garden-service to `watch`,
and `tsc` in turn only builds once and doesn't watch. I think this is a
bit clearer for developers anyway.
  • Loading branch information
edvald committed Jun 23, 2019
1 parent b950823 commit adc007b
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 1,261 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ts-node-*
.nyc_output
coverage/
gulpfile.js
!garden-service/gulpfile.js
*.map
*.tgz
build/
Expand Down
25 changes: 25 additions & 0 deletions garden-service/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (C) 2018 Garden Technologies, Inc. <info@garden.io>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

const { resolve, join } = require("path")

const gulp = require("gulp")
const pegjs = require("gulp-pegjs")

const pegjsSources = resolve(__dirname, "src", "*.pegjs")
const destDir = resolve(__dirname, "build")

gulp.task("pegjs", () =>
gulp.src(pegjsSources)
.pipe(pegjs({ format: "commonjs" }))
.pipe(gulp.dest(join(destDir, "src"))),
)

gulp.task("pegjs-watch", () =>
gulp.watch(pegjsSources, gulp.series(["pegjs"])),
)
58 changes: 0 additions & 58 deletions garden-service/gulpfile.ts

This file was deleted.

Loading

0 comments on commit adc007b

Please sign in to comment.