@lumeland/plugin-modules 1.0.0-beta-8 → 1.0.0-beta-9

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 ADDED
@@ -0,0 +1,9 @@
1
+ # @lumeland/plugin-modules
2
+
3
+ Plugin to use ESM and TypeScript modules to create pages, layouts, and store data
4
+
5
+ More info at https://lume.land/plugins/modules
6
+
7
+ ---
8
+
9
+ Please see [CHANGELOG](CHANGELOG.md) for information about the recent changes.
@@ -5,11 +5,6 @@ export interface Options {
5
5
  extensions?: string[];
6
6
  /** Optional sub-extension for page files */
7
7
  pageSubExtension?: string;
8
- /**
9
- * Custom includes path
10
- * @default `site.options.includes`
11
- */
12
- includes?: string;
13
8
  }
14
9
  export declare const defaults: {
15
10
  extensions: string[];
@@ -18,8 +13,6 @@ export declare const defaults: {
18
13
  /** Template engine to render js/ts files */
19
14
  export declare class ModuleEngine implements Engine {
20
15
  helpers: Record<string, Helper>;
21
- includes: string;
22
- constructor(includes: string);
23
16
  deleteCache(): void;
24
17
  render(content: unknown, data: Record<string, unknown>): Promise<unknown>;
25
18
  addHelper(name: string, fn: Helper): void;
package/build/src/mod.js CHANGED
@@ -8,10 +8,6 @@ export const defaults = {
8
8
  /** Template engine to render js/ts files */
9
9
  export class ModuleEngine {
10
10
  helpers = {};
11
- includes;
12
- constructor(includes) {
13
- this.includes = includes;
14
- }
15
11
  deleteCache() { }
16
12
  async render(content, data) {
17
13
  return typeof content === "function" ? await content(data, this.helpers) : content;
@@ -27,12 +23,8 @@ export class ModuleEngine {
27
23
  */
28
24
  export function modules(userOptions) {
29
25
  return (site) => {
30
- const options = merge({ ...defaults, includes: site.options.includes }, userOptions);
31
- const engine = new ModuleEngine(options.includes);
32
- // Ignore includes folder
33
- if (options.includes) {
34
- site.ignore(options.includes);
35
- }
26
+ const options = merge(defaults, userOptions);
27
+ const engine = new ModuleEngine();
36
28
  // Load the _data files
37
29
  site.loadData(options.extensions, loader);
38
30
  // Load the pages and register the engine
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@lumeland/plugin-modules",
3
- "version": "1.0.0-beta-8",
3
+ "version": "1.0.0-beta-9",
4
4
  "description": "Plugin to use ESM and TypeScript modules to create pages, layouts, and store data",
5
+ "keywords": [
6
+ "lume-plugin"
7
+ ],
5
8
  "homepage": "https://lume.land/plugins/modules/",
6
9
  "license": "MIT",
7
10
  "author": "Óscar Otero",
@@ -25,6 +28,6 @@
25
28
  }
26
29
  },
27
30
  "peerDependencies": {
28
- "@lumeland/core": "^1.0.0-beta-8"
31
+ "@lumeland/core": "^1.0.0-beta-9"
29
32
  }
30
33
  }