1.0.6 • Published 8 months ago

@itcase/gulp v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

ITCase Gulp

Presets of gulp task

Installation

$ npm i -D @itcase/gulp gulp postcss

Usage

  1. Create gulpfile.mjs
  2. Set list of tasks, example: email
  3. Available tasks located in the ./tasks folder
  4. Create postcss.config.js
  5. Optionally you can add commands in Makefile

gulpfile.mjs

import gulpTasks, {
  email,
  emailTemplates,
  errorTemplates,
  watchEmail,
  watchErrors,
} from '@itcase/gulp'

export default gulpTasks
export { email, emailTemplates, errorTemplates, watchEmail, watchErrors }

postcss.config.js

const postcssConfig = require('@itcase/gulp/postcss/index.cjs')

module.exports = postcssConfig

MakeFile

email:
  gulp emailTemplates --path templates/emails/ $(ARGV)
  gulp emailTemplates --path api/templates/api/emails/ $(ARGV)

email-prod:
  gulp emailTemplates --path templates/emails/ --production
  gulp emailTemplates --path api/templates/api/emails/ --production

error:
	gulp errorTemplates

List of tasks

List of available tasks is called by the command gulp --tasks

gulp email

gulp emailTemplates

Create email templates with inline CSS styles

Options:

  • --cssPath – path to css files, default: static/emails/css/
  • --path – path to template folder
  • --targetPath – path to destanation folder for processed templates
  gulp emailTemplates --path templates/emails/
  gulp emailTemplates --path api/templates/api/emails/

gulp errorTemplates

Options:

  • --cssPath – path to css files, default: static/errors/css/
  • --path – path to template folder, default: static/errors/
  • --targetPath – path to destanation folder for processed templates

gulp pdf

Options:

  • --cssPath – path to css files, default: static/pdf/
  • --path – path to template folder, default: api/templates/api/document/
  • --targetPath – path to destanation folder for processed templates

gulp webview

Options:

  • --cssPath – path to css files, default: static/webview/
  • --targetPath – path to destanation folder for processed templates

gulp watchEmail

gulp watchErrors