@barefootjs/jinja 0.30.5 → 0.31.0
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/README.md +10 -6
- package/dist/adapter/expr/emitters.d.ts +1 -1
- package/dist/adapter/expr/emitters.d.ts.map +1 -1
- package/dist/adapter/index.js +19 -4
- package/dist/adapter/jinja-adapter.d.ts +4 -5
- package/dist/adapter/jinja-adapter.d.ts.map +1 -1
- package/dist/index.js +21 -7
- package/dist/render-divergences.d.ts.map +1 -1
- package/dist/vite.d.ts +38 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +6742 -0
- package/package.json +22 -9
- package/python/barefootjs/runtime.py +33 -3
- package/src/__tests__/jinja-adapter-unit.test.ts +146 -0
- package/src/__tests__/vite.test.ts +125 -0
- package/src/adapter/expr/emitters.ts +33 -9
- package/src/adapter/jinja-adapter.ts +39 -10
- package/src/render-divergences.ts +13 -15
- package/src/vite.ts +215 -0
- package/dist/build.d.ts +0 -28
- package/dist/build.d.ts.map +0 -1
- package/dist/build.js +0 -189257
- package/src/build.ts +0 -37
package/src/build.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Jinja2 build config factory for barefoot.config.ts
|
|
2
|
-
|
|
3
|
-
import type { BuildOptions } from '@barefootjs/jsx'
|
|
4
|
-
import { JinjaAdapter } from './adapter/index.ts'
|
|
5
|
-
import type { JinjaAdapterOptions } from './adapter/index.ts'
|
|
6
|
-
|
|
7
|
-
export interface JinjaBuildOptions extends BuildOptions {
|
|
8
|
-
/** Adapter-specific options passed to JinjaAdapter */
|
|
9
|
-
adapterOptions?: JinjaAdapterOptions
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Create a BarefootBuildConfig for Jinja2 template projects.
|
|
14
|
-
*
|
|
15
|
-
* Uses structural typing — does not import BarefootBuildConfig to avoid a
|
|
16
|
-
* circular dependency between @barefootjs/jinja and @barefootjs/cli.
|
|
17
|
-
*/
|
|
18
|
-
export function createConfig(options: JinjaBuildOptions = {}) {
|
|
19
|
-
return {
|
|
20
|
-
adapter: new JinjaAdapter(options.adapterOptions),
|
|
21
|
-
paths: options.paths,
|
|
22
|
-
components: options.components,
|
|
23
|
-
outDir: options.outDir,
|
|
24
|
-
minify: options.minify,
|
|
25
|
-
contentHash: options.contentHash,
|
|
26
|
-
externals: options.externals,
|
|
27
|
-
externalsBasePath: options.externalsBasePath,
|
|
28
|
-
bundleEntries: options.bundleEntries,
|
|
29
|
-
localImportPrefixes: options.localImportPrefixes,
|
|
30
|
-
outputLayout: options.outputLayout ?? {
|
|
31
|
-
templates: 'templates',
|
|
32
|
-
clientJs: 'client',
|
|
33
|
-
runtime: 'client',
|
|
34
|
-
},
|
|
35
|
-
postBuild: options.postBuild,
|
|
36
|
-
}
|
|
37
|
-
}
|