@powerlines/plugin-content-collections 0.1.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/LICENSE +201 -0
- package/README.md +294 -0
- package/dist/chunk-FBBMZ4NC.cjs +7 -0
- package/dist/chunk-UCUR73HG.js +7 -0
- package/dist/helpers/create-emitter.cjs +7 -0
- package/dist/helpers/create-emitter.d.cts +28 -0
- package/dist/helpers/create-emitter.d.ts +28 -0
- package/dist/helpers/create-emitter.js +7 -0
- package/dist/helpers/create-writer.cjs +12 -0
- package/dist/helpers/create-writer.d.cts +31 -0
- package/dist/helpers/create-writer.d.ts +31 -0
- package/dist/helpers/create-writer.js +12 -0
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/index.d.cts +24 -0
- package/dist/helpers/index.d.ts +24 -0
- package/dist/helpers/index.js +1 -0
- package/dist/index-3C9UezFx.d.cts +1342 -0
- package/dist/index-3C9UezFx.d.ts +1342 -0
- package/dist/src/index.cjs +7 -0
- package/dist/src/index.d.cts +35 -0
- package/dist/src/index.d.ts +35 -0
- package/dist/src/index.js +7 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +22 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +1 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +22 -0
- package/dist/types/plugin.d.ts +22 -0
- package/dist/types/plugin.js +0 -0
- package/package.json +126 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {a}from'../chunk-UCUR73HG.js';import {serialize}from'@content-collections/core';import {joinPaths}from'@stryke/path/join-paths';import {kebabCase}from'@stryke/string-format/kebab-case';import m from'pluralize';import {getBaseFileHeader}from'powerlines/lib/utilities/file-header';/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
const p=a(e=>m(e.charAt(0).toUpperCase()+e.slice(1)),"createConstName"),s=a(e=>`all${p(e)}`,"createArrayConstName"),j=a(e=>({createJavaScriptFile:a(async r=>e.writeBuiltin(`${getBaseFileHeader(e)}
|
|
8
|
+
${r.collections.map(({name:t})=>`import ${s(t)} from "./${kebabCase(t)}";`).join(`
|
|
9
|
+
`)}
|
|
10
|
+
|
|
11
|
+
export { ${r.collections.map(({name:t})=>s(t)).join(", ")} };
|
|
12
|
+
`,"content"),"createJavaScriptFile"),createTypeDefinitionFile:a(async r=>Promise.resolve(),"createTypeDefinitionFile"),createDataFiles:a(async r=>{await Promise.all(r.map(async t=>e.config.contentCollections.generatedPath?e.fs.writeFile(joinPaths(e.config.contentCollections.generatedPath,kebabCase(t.name)),serialize(t.documents.map(n=>n.document))):e.writeBuiltin(serialize(t.documents.map(n=>n.document)),joinPaths("content",kebabCase(t.name)))));},"createDataFiles")}),"createWriter");export{j as createWriter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var createEmitter=require('./create-emitter'),createWriter=require('./create-writer');Object.keys(createEmitter).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return createEmitter[k]}})});Object.keys(createWriter).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return createWriter[k]}})});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { createEmitter } from './create-emitter.cjs';
|
|
2
|
+
export { createWriter } from './create-writer.cjs';
|
|
3
|
+
import '@content-collections/core';
|
|
4
|
+
import '../index-3C9UezFx.cjs';
|
|
5
|
+
import '@storm-software/build-tools/types';
|
|
6
|
+
import '@storm-software/config-tools/types';
|
|
7
|
+
import '@storm-software/config/types';
|
|
8
|
+
import '@stryke/types/base';
|
|
9
|
+
import '@stryke/types/configuration';
|
|
10
|
+
import '@stryke/types/file';
|
|
11
|
+
import 'vite';
|
|
12
|
+
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/types/package-json';
|
|
14
|
+
import 'jiti';
|
|
15
|
+
import 'oxc-parser';
|
|
16
|
+
import 'semver';
|
|
17
|
+
import 'unplugin';
|
|
18
|
+
import '@stryke/types/tsconfig';
|
|
19
|
+
import 'typescript';
|
|
20
|
+
import '@stryke/json/types';
|
|
21
|
+
import 'memfs';
|
|
22
|
+
import 'node:fs';
|
|
23
|
+
import 'unionfs';
|
|
24
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { createEmitter } from './create-emitter.js';
|
|
2
|
+
export { createWriter } from './create-writer.js';
|
|
3
|
+
import '@content-collections/core';
|
|
4
|
+
import '../index-3C9UezFx.js';
|
|
5
|
+
import '@storm-software/build-tools/types';
|
|
6
|
+
import '@storm-software/config-tools/types';
|
|
7
|
+
import '@storm-software/config/types';
|
|
8
|
+
import '@stryke/types/base';
|
|
9
|
+
import '@stryke/types/configuration';
|
|
10
|
+
import '@stryke/types/file';
|
|
11
|
+
import 'vite';
|
|
12
|
+
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/types/package-json';
|
|
14
|
+
import 'jiti';
|
|
15
|
+
import 'oxc-parser';
|
|
16
|
+
import 'semver';
|
|
17
|
+
import 'unplugin';
|
|
18
|
+
import '@stryke/types/tsconfig';
|
|
19
|
+
import 'typescript';
|
|
20
|
+
import '@stryke/json/types';
|
|
21
|
+
import 'memfs';
|
|
22
|
+
import 'node:fs';
|
|
23
|
+
import 'unionfs';
|
|
24
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'./create-emitter';export*from'./create-writer';
|