mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
chore(deps): update eslint-config and globby
This commit is contained in:
parent
865e1a9206
commit
e3c4578a7f
@ -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({
|
||||||
|
@ -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 = []
|
||||||
|
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user