histoire 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/bin.js +1 -0
- package/dist/node/build.js +12 -0
- package/dist/node/vite.js +4 -4
- package/package.json +5 -5
- package/src/node/bin.ts +1 -0
- package/src/node/build.ts +12 -0
- package/src/node/vite.ts +4 -4
package/dist/node/bin.js
CHANGED
|
@@ -5,6 +5,7 @@ import sade from 'sade';
|
|
|
5
5
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
6
|
const { version } = JSON.parse(fs.readFileSync(resolve(__dirname, '../../package.json'), 'utf8'));
|
|
7
7
|
process.env.NODE_ENV = 'development';
|
|
8
|
+
process.env.HISTOIRE = 'true';
|
|
8
9
|
const program = sade('histoire');
|
|
9
10
|
program.version(version);
|
|
10
11
|
program.command('dev')
|
package/dist/node/build.js
CHANGED
|
@@ -52,6 +52,7 @@ export async function build(ctx) {
|
|
|
52
52
|
const buildViteConfig = mergeViteConfig(await getViteConfigWithPlugins(false, ctx), {
|
|
53
53
|
mode: 'development',
|
|
54
54
|
build: {
|
|
55
|
+
lib: false,
|
|
55
56
|
rollupOptions: {
|
|
56
57
|
input: [
|
|
57
58
|
join(APP_PATH, 'bundle-main.js'),
|
|
@@ -64,6 +65,16 @@ export async function build(ctx) {
|
|
|
64
65
|
}
|
|
65
66
|
},
|
|
66
67
|
},
|
|
68
|
+
plugins: [
|
|
69
|
+
{
|
|
70
|
+
name: 'histoire-build-rollup-options-override',
|
|
71
|
+
enforce: 'post',
|
|
72
|
+
options(options) {
|
|
73
|
+
// Don't externalize
|
|
74
|
+
options.external = [];
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
67
78
|
},
|
|
68
79
|
outDir: ctx.config.outDir,
|
|
69
80
|
emptyOutDir: true,
|
|
@@ -99,6 +110,7 @@ export async function build(ctx) {
|
|
|
99
110
|
});
|
|
100
111
|
buildViteConfig.plugins.push({
|
|
101
112
|
name: 'histoire-build-config-override',
|
|
113
|
+
enforce: 'post',
|
|
102
114
|
config(config) {
|
|
103
115
|
// Don't externalize
|
|
104
116
|
config.build.rollupOptions.external = [];
|
package/dist/node/vite.js
CHANGED
|
@@ -239,17 +239,17 @@ if (import.meta.hot) {
|
|
|
239
239
|
return ctx.config.setupCode?.[index] ?? '';
|
|
240
240
|
}
|
|
241
241
|
if (id === RESOLVED_SUPPORT_PLUGINS_CLIENT) {
|
|
242
|
-
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(
|
|
242
|
+
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(${JSON.stringify(require.resolve(`${p.moduleName}/client`, {
|
|
243
243
|
paths: [ctx.root, import.meta.url],
|
|
244
|
-
})}
|
|
244
|
+
}))})`);
|
|
245
245
|
return `export const clientSupportPlugins = {
|
|
246
246
|
${plugins.join(',\n ')}
|
|
247
247
|
}`;
|
|
248
248
|
}
|
|
249
249
|
if (id === RESOLVED_SUPPORT_PLUGINS_COLLECT) {
|
|
250
|
-
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(
|
|
250
|
+
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(${JSON.stringify(require.resolve(`${p.moduleName}/collect`, {
|
|
251
251
|
paths: [ctx.root, import.meta.url],
|
|
252
|
-
})}
|
|
252
|
+
}))})`);
|
|
253
253
|
return `export const collectSupportPlugins = {
|
|
254
254
|
${plugins.join(',\n ')}
|
|
255
255
|
}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "histoire",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "A fast story book powered by Vite",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"histoire": "./bin.mjs"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@histoire/app": "^0.9.
|
|
33
|
-
"@histoire/controls": "^0.9.
|
|
34
|
-
"@histoire/shared": "^0.9.
|
|
35
|
-
"@histoire/vendors": "^0.9.
|
|
32
|
+
"@histoire/app": "^0.9.1",
|
|
33
|
+
"@histoire/controls": "^0.9.1",
|
|
34
|
+
"@histoire/shared": "^0.9.1",
|
|
35
|
+
"@histoire/vendors": "^0.9.1",
|
|
36
36
|
"@types/flexsearch": "^0.7.3",
|
|
37
37
|
"@types/markdown-it": "^12.2.3",
|
|
38
38
|
"birpc": "^0.1.1",
|
package/src/node/bin.ts
CHANGED
|
@@ -8,6 +8,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
8
8
|
const { version } = JSON.parse(fs.readFileSync(resolve(__dirname, '../../package.json'), 'utf8'))
|
|
9
9
|
|
|
10
10
|
process.env.NODE_ENV = 'development'
|
|
11
|
+
process.env.HISTOIRE = 'true'
|
|
11
12
|
|
|
12
13
|
const program = sade('histoire')
|
|
13
14
|
program.version(version)
|
package/src/node/build.ts
CHANGED
|
@@ -70,6 +70,7 @@ export async function build (ctx: Context) {
|
|
|
70
70
|
const buildViteConfig: ViteInlineConfig = mergeViteConfig(await getViteConfigWithPlugins(false, ctx), {
|
|
71
71
|
mode: 'development',
|
|
72
72
|
build: {
|
|
73
|
+
lib: false,
|
|
73
74
|
rollupOptions: {
|
|
74
75
|
input: [
|
|
75
76
|
join(APP_PATH, 'bundle-main.js'),
|
|
@@ -82,6 +83,16 @@ export async function build (ctx: Context) {
|
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
},
|
|
86
|
+
plugins: [
|
|
87
|
+
{
|
|
88
|
+
name: 'histoire-build-rollup-options-override',
|
|
89
|
+
enforce: 'post',
|
|
90
|
+
options (options) {
|
|
91
|
+
// Don't externalize
|
|
92
|
+
options.external = []
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
],
|
|
85
96
|
},
|
|
86
97
|
outDir: ctx.config.outDir,
|
|
87
98
|
emptyOutDir: true,
|
|
@@ -119,6 +130,7 @@ export async function build (ctx: Context) {
|
|
|
119
130
|
|
|
120
131
|
buildViteConfig.plugins.push({
|
|
121
132
|
name: 'histoire-build-config-override',
|
|
133
|
+
enforce: 'post',
|
|
122
134
|
config (config) {
|
|
123
135
|
// Don't externalize
|
|
124
136
|
config.build.rollupOptions.external = []
|
package/src/node/vite.ts
CHANGED
|
@@ -265,18 +265,18 @@ if (import.meta.hot) {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
if (id === RESOLVED_SUPPORT_PLUGINS_CLIENT) {
|
|
268
|
-
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(
|
|
268
|
+
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(${JSON.stringify(require.resolve(`${p.moduleName}/client`, {
|
|
269
269
|
paths: [ctx.root, import.meta.url],
|
|
270
|
-
})}
|
|
270
|
+
}))})`)
|
|
271
271
|
return `export const clientSupportPlugins = {
|
|
272
272
|
${plugins.join(',\n ')}
|
|
273
273
|
}`
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
if (id === RESOLVED_SUPPORT_PLUGINS_COLLECT) {
|
|
277
|
-
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(
|
|
277
|
+
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import(${JSON.stringify(require.resolve(`${p.moduleName}/collect`, {
|
|
278
278
|
paths: [ctx.root, import.meta.url],
|
|
279
|
-
})}
|
|
279
|
+
}))})`)
|
|
280
280
|
return `export const collectSupportPlugins = {
|
|
281
281
|
${plugins.join(',\n ')}
|
|
282
282
|
}`
|