Skip to content

Instantly share code, notes, and snippets.

@Oaphi
Last active October 31, 2021 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oaphi/c9c58a779b4c4f50252f9adf36256e13 to your computer and use it in GitHub Desktop.
Save Oaphi/c9c58a779b4c4f50252f9adf36256e13 to your computer and use it in GitHub Desktop.
Gulp workflow
# if gulp CLI is not installed
npm i -g gulp-cli
# gulp package
npm i -D gulp @types/gulp
# TypeScript prerequisites
# ts-node is required for gulpfile.ts
npm i -D typescript ts-node
# necessary plugins
# Uglify plugin doesn't come with types built-in
# same for Rename, Concat plugins
npm i -D gulp-typescript \
gulp-uglify @types/gulp-uglify \
gulp-rename @types/gulp-rename \
gulp-concat @types/gulp-concat \
gulp-append-prepend \
gulp-autoprefixer @types/gulp-autoprefixer \
gulp-inject @types/gulp-inject && \
touch gulpfile.ts && \
code guplfile.ts
# browserify - plugin not maintained, needs direct integration
# vinyl buffer is needed to create a transform stream
npm i -D browserify @types/browserify \
vinyl-buffer @types/vinyl-buffer \
vinyl-source-stream @types/vinyl-source-stream
# gulp-clean is deprecated, use 'del' package
npm i -D del
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment