@bodiless/webpack
Advanced tools
Comparing version 1.0.0-canary-2055-1249.0.164310e to 1.0.0-canary-2055-1251.0.828ddef
import { Configuration } from 'webpack'; | ||
import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin'; | ||
import { PluginOptions } from './util'; | ||
declare type StatoscopePluginOptions = Omit<PluginOptions, 'include' | 'logging'> & { | ||
type StatoscopePluginOptions = Omit<PluginOptions, 'include' | 'logging'> & { | ||
sitePath: string; | ||
@@ -6,0 +6,0 @@ root?: string; |
@@ -12,2 +12,5 @@ "use strict"; | ||
return () => null; | ||
if (!fs_1.default.existsSync(sitePath)) { | ||
fs_1.default.mkdirSync(sitePath, { recursive: true }); | ||
} | ||
// Check if baseline json exists. | ||
@@ -18,7 +21,7 @@ if (fs_1.default.existsSync(`${sitePath}/stats-${name}-baseline.json`)) { | ||
// Auto discover previous stats. | ||
const previousStats = fs_1.default.readdirSync(`${sitePath}/public/`).filter(fn => fn.startsWith(`stats-${name}-`) && fn.endsWith('.json')); | ||
additionalStats.push(...previousStats.map(fn => `${sitePath}/public/${fn}`)); | ||
const previousStats = fs_1.default.readdirSync(`${sitePath}/`).filter(fn => fn.startsWith(`stats-${name}-`) && fn.endsWith('.json')); | ||
additionalStats.push(...previousStats.map(fn => `${sitePath}/${fn}`)); | ||
return new webpack_plugin_1.default({ | ||
saveReportTo: `${sitePath}/public/stats-[name].html`, | ||
saveStatsTo: `${sitePath}/public/stats-[name]-[hash].json`, | ||
saveReportTo: `${sitePath}/stats-[name].html`, | ||
saveStatsTo: `${sitePath}/stats-[name]-[hash].json`, | ||
normalizeStats: true, | ||
@@ -25,0 +28,0 @@ additionalStats, |
@@ -16,7 +16,7 @@ /** | ||
import { PluginOptions } from './util'; | ||
declare type Resolver = (args: { | ||
type Resolver = (args: { | ||
componentName: string; | ||
packageName?: string; | ||
}) => string; | ||
declare type TokenShadowPluginOptions = Omit<PluginOptions, 'exclude'> & { | ||
type TokenShadowPluginOptions = Omit<PluginOptions, 'exclude'> & { | ||
resolvers: Resolver[]; | ||
@@ -23,0 +23,0 @@ }; |
@@ -15,4 +15,4 @@ /** | ||
export declare const createLogger: (log?: boolean) => (message: string) => void; | ||
declare type IncludeSetting = RegExp | boolean; | ||
export declare type PluginOptions = { | ||
type IncludeSetting = RegExp | boolean; | ||
export type PluginOptions = { | ||
enabled?: boolean; | ||
@@ -19,0 +19,0 @@ logging?: boolean; |
{ | ||
"name": "@bodiless/webpack", | ||
"version": "1.0.0-canary-2055-1249.0.164310e", | ||
"version": "1.0.0-canary-2055-1251.0.828ddef", | ||
"description": "Portable webpack configuration for bodiless sites", | ||
@@ -34,3 +34,3 @@ "author": "Chris Oden <coden@its.jnj.com>", | ||
"dependencies": { | ||
"@bodiless/cli": "1.0.0-canary-2055-1249.0.164310e", | ||
"@bodiless/cli": "1.0.0-canary-2055-1251.0.828ddef", | ||
"@statoscope/webpack-plugin": "^5.20.1", | ||
@@ -43,3 +43,3 @@ "lodash": "^4.17.19", | ||
}, | ||
"gitHead": "164310e48ad75c4aad84d318efc7f0861dc92c5d" | ||
"gitHead": "828ddef8acf049c739684aba01987ea79b989a89" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
42219
26
390
+ Added@bodiless/cli@1.0.0-canary-2055-1251.0.828ddef(transitive)
+ Addedcaniuse-lite@1.0.30001616(transitive)
+ Addedpicocolors@1.0.0(transitive)
+ Addedupdate-browserslist-db@1.0.15(transitive)
- Removed@bodiless/cli@1.0.0-canary-2055-1249.0.164310e(transitive)
- Removedarray-union@2.1.0(transitive)