Skip to content

Commit

Permalink
Merge pull request #425 from scout-handbook/vite
Browse files Browse the repository at this point in the history
Building with Vite
  • Loading branch information
marekdedic authored Jan 5, 2024
2 parents fa094ee + d17e5b5 commit 2943f37
Show file tree
Hide file tree
Showing 10 changed files with 2,935 additions and 750 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"parserOptions": {
"project": null
},
"files": ["gulpfile.js", "postcss.config.js", "webpack.config.js"],
"files": ["gulpfile.js", "postcss.config.cjs"],
"rules": {
"deprecation/deprecation": "off",
"@typescript-eslint/await-thenable": "off",
Expand Down
25 changes: 11 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
/* eslint-env node */

var exec = require("child_process").exec;
const gulp = require("gulp");
const yargs = require("yargs");

const postcss = require("gulp-postcss");
import { exec } from "child_process";
import gulp from "gulp";
import postcss from "gulp-postcss";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";

gulp.task("build:main", (cb) => {
const config = yargs.argv.config;
exec(
"npx webpack --color --env client-config=" + config,
(err, stdout, stderr) => {
console.log(stdout);
console.log(stderr);
cb(err);
},
);
const config = yargs(hideBin(process.argv)).string("config").argv.config;
exec('VITE_CONFIG="' + config + '" npx vite build', (err, stdout, stderr) => {
console.log(stdout);
console.log(stderr);
cb(err);
});
});

gulp.task("build:error:css", () =>
Expand Down
Loading

0 comments on commit 2943f37

Please sign in to comment.