UNPKG

@markusantonwolf/ta-foodtrucks

Version:

TA-Foodtrucks plugin shows the next food truck and street food dates in your area based on Craftplaces API. You can customize the endpoints to get all dates for a specific vendor, for a specific city or just for a location you are interested in. The light

65 lines (59 loc) 1.93 kB
const config = require('config') const { src, dest, parallel, series } = require('gulp') const concat = require('gulp-concat') const babel = require('gulp-babel') const minify = require('gulp-minify') const SOURCE_ALPINE = config.get('source.alpine_js') const NAME_ALPINE = config.get('name.alpine_js') const DESTINATION_ALPINE = config.get('destination.alpine_js') const SOURCE_PLUGIN_JS = config.get('source.plugin_js') const NAME_PLUGIN_JS = config.get('name.plugin_js') const DESTINATION_PLUGIN_JS = config.get('destination.plugin_js') const SOURCE_PLUGIN_ALPINE_JS = config.get('source.plugin_alpine_js') const NAME_PLUGIN_ALPINE_JS = config.get('name.plugin_alpine_js') const DESTINATION_PLUGIN_ALPINE_JS = config.get('destination.plugin_alpine_js') const alpine_js = () => { return src(SOURCE_ALPINE) .pipe(concat(NAME_ALPINE)) .pipe( minify({ ext: { min: '.min.js', }, ignoreFiles: ['.min.js'], }) ) .pipe(dest(DESTINATION_ALPINE)) } const ta_script = () => { return src(SOURCE_PLUGIN_JS) .pipe( babel({ presets: ['@babel/env'], }) ) .pipe(concat(NAME_PLUGIN_JS)) .pipe( minify({ ext: { min: '.min.js', }, ignoreFiles: ['.min.js'], }) ) .pipe(dest(DESTINATION_PLUGIN_JS)) } const ta_script_alpine = () => { return src(SOURCE_PLUGIN_ALPINE_JS) .pipe(concat(NAME_PLUGIN_ALPINE_JS)) .pipe( minify({ ext: { min: '.min.js', }, ignoreFiles: ['.min.js'], }) ) .pipe(dest(DESTINATION_PLUGIN_ALPINE_JS)) } module.exports.scripts = series(parallel(alpine_js, ta_script), ta_script_alpine)