pioug / gulp-swc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gulp-swc Run tests

Install

$ npm install github:pioug/gulp-swc#1.0.0

Example

const gulp = require("gulp");
const sourcemaps = require("gulp-sourcemaps");
const swc = require("gulp-swc");
const swcOptions = {
  compress: {
    drop_console: true,
  },
  format: {
    comments: false,
  },
};

gulp
  .src("script.js")
  .pipe(sourcemaps.init(swcOptions))
  .pipe(swc())
  .pipe(sourcemaps.write(""))
  .pipe(gulp.dest("build"));

About

License:MIT License


Languages

Language:JavaScript 100.0%