chore(deps): update eslint-config and globby

This commit is contained in:
Pooya Parsa 2021-12-22 22:27:23 +01:00
parent 865e1a9206
commit e3c4578a7f
3 changed files with 5 additions and 5 deletions

View File

@ -1,11 +1,11 @@
import { resolve, join } from 'path' import { resolve, join } from 'path'
import { promises as fsp } from 'fs' import { promises as fsp } from 'fs'
import glob from 'globby' import { globby } from 'globby'
const r = (...path: string[]) => resolve(join(__dirname, '..', ...path)) const r = (...path: string[]) => resolve(join(__dirname, '..', ...path))
async function main () { async function main () {
const templates = await glob(r('dist/templates/*.mjs')) const templates = await globby(r('dist/templates/*.mjs'))
for (const file of templates) { for (const file of templates) {
const { template } = await import(file) const { template } = await import(file)
const updated = template({ const updated = template({

View File

@ -2,7 +2,6 @@ import { promises as fsp } from 'fs'
import { resolve, join, dirname, basename } from 'upath' import { resolve, join, dirname, basename } from 'upath'
import type { Plugin } from 'vite' import type { Plugin } from 'vite'
import Critters from 'critters' import Critters from 'critters'
import glob from 'globby'
import template from 'lodash.template' import template from 'lodash.template'
import htmlMinifier from 'html-minifier' import htmlMinifier from 'html-minifier'
import { camelCase } from 'scule' import { camelCase } from 'scule'
@ -19,7 +18,8 @@ export const RenderPlugin = () => {
async writeBundle () { async writeBundle () {
const distDir = r('dist') const distDir = r('dist')
const critters = new Critters({ path: distDir }) const critters = new Critters({ path: distDir })
const htmlFiles = await glob(r('dist/templates/**/*.html')) const globby = await import('globby').then(r => r.globby)
const htmlFiles = await globby(r('dist/templates/**/*.html'))
const templateExports = [] const templateExports = []

View File

@ -28,7 +28,7 @@
"@types/html-minifier": "^4.0.1", "@types/html-minifier": "^4.0.1",
"@types/lodash.template": "^4.5.0", "@types/lodash.template": "^4.5.0",
"critters": "^0.0.15", "critters": "^0.0.15",
"globby": "^11.0.4", "globby": "^12.0.2",
"html-minifier": "^4.0.0", "html-minifier": "^4.0.0",
"jiti": "^1.12.9", "jiti": "^1.12.9",
"lodash.template": "^4.5.0", "lodash.template": "^4.5.0",