Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
tborychowski committed May 8, 2024
1 parent 879a6cb commit 48ba2f8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import cleanCSS from 'gulp-clean-css';
import concat from 'gulp-concat';
import gulp from 'gulp';
import gulpEslint from 'gulp-eslint-new';
// import gulpStylelint from '@ronilaukkarinen/gulp-stylelint';
import gulpStylelint from 'gulp-stylelint-esm';
import inject from 'gulp-inject-string';
import livereload from 'gulp-livereload';
import NodeResolve from '@esbuild-plugins/node-resolve';
import { NodeResolvePlugin as NodeResolve } from '@esbuild-plugins/node-resolve';
import server from 'gulp-webserver';
import sveltePlugin from 'esbuild-svelte';

Expand Down Expand Up @@ -43,6 +42,7 @@ const PATHS = {
DIST: 'docs/',
};


function getVersion () {
const pkg = fs.readFileSync('./package.json', 'utf8');
let json;
Expand Down Expand Up @@ -104,8 +104,8 @@ export function js () {
bundle: true,
minify: isProd,
sourcemap: !isProd,
loader: { '.svg': 'text' },
logLevel: 'warning',
// loader: { '.svg': 'text' },
// https://esbuild.github.io/api/#log-override
logOverride: { 'direct-eval': 'silent' },
legalComments: 'none',
Expand All @@ -114,20 +114,17 @@ export function js () {
color: true,
plugins: [
sveltePlugin({ compilerOptions: { dev: !isProd, css: 'external' } }),
// @ts-ignore
NodeResolve.default({ extensions: ['.js', '.svelte'] }),
NodeResolve({ extensions: ['.js', '.svelte'] }),
],
};

return src(PATHS.JS.INPUT, { sourcemaps: !isProd })
// @ts-ignore
.pipe(gulpEsbuild(cfg))
.pipe(dest(PATHS.DIST, { sourcemaps: '.' }))
.pipe(livereload());
}



export function libCSS () {
return src(PATHS.CSS.LIB.INPUT, { sourcemaps: !isProd })
.pipe(concat(PATHS.CSS.LIB.OUT))
Expand Down

0 comments on commit 48ba2f8

Please sign in to comment.