@lumeland/plugin-jsx 1.0.0-beta-8 → 1.0.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/CHANGELOG.md CHANGED
@@ -5,6 +5,6 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
- ## 1.0.0 - Unreleased
8
+ ## 1.0.0 - 2026-10-31
9
9
 
10
10
  First version
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # @lumeland/plugin-jsx
2
+
3
+ Plugin to create pages and layouts with JSX.
4
+
5
+ More info at https://lume.land/plugins/jsx
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,9 +13,6 @@ export declare const defaults: {
18
13
  /** Template engine to render JSX files */
19
14
  export declare class JsxEngine implements Engine {
20
15
  helpers: Record<string, Helper>;
21
- basePath: string;
22
- includes: string;
23
- constructor(basePath: string, includes: string);
24
16
  deleteCache(): void;
25
17
  render(content: unknown, data?: Record<string, unknown>): Promise<string>;
26
18
  addHelper(name: string, fn: Helper): void;
package/build/src/mod.js CHANGED
@@ -1,6 +1,6 @@
1
- import { renderComponent } from "../deps/ssx.js";
2
1
  import loader from "@lumeland/core/loaders/module.ts";
3
2
  import { merge } from "@lumeland/core/utils/object.ts";
3
+ import { renderComponent } from "../deps/ssx.js";
4
4
  // Default options
5
5
  export const defaults = {
6
6
  extensions: [".jsx", ".tsx"],
@@ -9,12 +9,6 @@ export const defaults = {
9
9
  /** Template engine to render JSX files */
10
10
  export class JsxEngine {
11
11
  helpers = {};
12
- basePath;
13
- includes;
14
- constructor(basePath, includes) {
15
- this.basePath = basePath;
16
- this.includes = includes;
17
- }
18
12
  deleteCache() { }
19
13
  async render(content, data = {}) {
20
14
  // If content is a string, convert to a JSX element
@@ -40,12 +34,8 @@ export class JsxEngine {
40
34
  */
41
35
  export function jsx(userOptions) {
42
36
  return (site) => {
43
- const options = merge({ ...defaults, includes: site.options.includes }, userOptions);
44
- const engine = new JsxEngine(site.src("/"), options.includes);
45
- // Ignore includes folder
46
- if (options.includes) {
47
- site.ignore(options.includes);
48
- }
37
+ const options = merge(defaults, userOptions);
38
+ const engine = new JsxEngine();
49
39
  // Load the pages and register the engine
50
40
  site.loadPages(options.extensions, {
51
41
  loader,
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@lumeland/plugin-jsx",
3
- "version": "1.0.0-beta-8",
4
- "description": "",
3
+ "version": "1.0.0",
4
+ "description": "Plugin to create pages and layouts with JSX.",
5
+ "keywords": [
6
+ "lume-plugin"
7
+ ],
5
8
  "homepage": "https://lume.land/plugins/jsx/",
6
9
  "license": "MIT",
7
10
  "author": "Óscar Otero",
@@ -24,10 +27,8 @@
24
27
  "import": "./build/src/*.js"
25
28
  }
26
29
  },
27
- "dependencies": {
28
- "@lumeland/ssx": "^0.1.16"
29
- },
30
30
  "peerDependencies": {
31
- "@lumeland/core": "^1.0.0-beta-8"
31
+ "@lumeland/core": "^1.0.0",
32
+ "@lumeland/ssx": "^0.1.16"
32
33
  }
33
34
  }