@barefootjs/xslate 0.8.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/dist/adapter/boolean-result.d.ts +42 -0
- package/dist/adapter/boolean-result.d.ts.map +1 -0
- package/dist/adapter/index.d.ts +6 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter/index.js +1204 -0
- package/dist/adapter/xslate-adapter.d.ts +176 -0
- package/dist/adapter/xslate-adapter.d.ts.map +1 -0
- package/dist/build.d.ts +28 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +1224 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1204 -0
- package/lib/BarefootJS/Backend/Xslate.pm +152 -0
- package/package.json +82 -0
- package/src/__tests__/xslate-counter.test.ts +142 -0
- package/src/adapter/boolean-result.ts +126 -0
- package/src/adapter/index.ts +6 -0
- package/src/adapter/xslate-adapter.ts +1721 -0
- package/src/build.ts +37 -0
- package/src/index.ts +8 -0
package/src/build.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Text::Xslate build config factory for barefoot.config.ts
|
|
2
|
+
|
|
3
|
+
import type { BuildOptions } from '@barefootjs/jsx'
|
|
4
|
+
import { XslateAdapter } from './adapter'
|
|
5
|
+
import type { XslateAdapterOptions } from './adapter'
|
|
6
|
+
|
|
7
|
+
export interface XslateBuildOptions extends BuildOptions {
|
|
8
|
+
/** Adapter-specific options passed to XslateAdapter */
|
|
9
|
+
adapterOptions?: XslateAdapterOptions
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Create a BarefootBuildConfig for Text::Xslate (Kolon) template projects.
|
|
14
|
+
*
|
|
15
|
+
* Uses structural typing — does not import BarefootBuildConfig to avoid a
|
|
16
|
+
* circular dependency between @barefootjs/xslate and @barefootjs/cli.
|
|
17
|
+
*/
|
|
18
|
+
export function createConfig(options: XslateBuildOptions = {}) {
|
|
19
|
+
return {
|
|
20
|
+
adapter: new XslateAdapter(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
|
+
}
|
package/src/index.ts
ADDED