@fractality/nunjucks 2.2.0 → 2.2.3

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
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 2.2.3 (2024-09-24)
7
+
8
+ **Note:** Version bump only for package @fractality/nunjucks
9
+
10
+ ## 2.2.2 (2024-09-20)
11
+
12
+ **Note:** Version bump only for package @fractality/nunjucks
13
+
14
+ ## 2.2.1 (2024-09-20)
15
+
16
+ **Note:** Version bump only for package @fractality/nunjucks
17
+
6
18
  # 2.2.0 (2024-09-20)
7
19
 
8
20
  ### Bug Fixes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @fractality/nunjucks
2
2
 
3
- [Nunjucks](http://mozilla.github.io/nunjucks/) template engine adapter for [Fractal](http://github.com/fractality/fractality).
3
+ [Nunjucks](http://mozilla.github.io/nunjucks/) template engine adapter for [Fractality](http://github.com/fractality/fractality).
4
4
 
5
5
  [![NPM Version](https://img.shields.io/npm/v/@fractality/nunjucks)](https://www.npmjs.com/package/@fractality/nunjucks)
6
6
 
@@ -19,8 +19,8 @@ npm i @fractality/nunjucks --save
19
19
  ## Usage
20
20
 
21
21
  ```javascript
22
- fractal.components.engine('@fractality/nunjucks'); // register the Nunjucks adapter for your components
23
- fractal.components.set('ext', '.njk'); // look for files with a .njk file extension
22
+ fractality.components.engine('@fractality/nunjucks'); // register the Nunjucks adapter for your components
23
+ fractality.components.set('ext', '.njk'); // look for files with a .njk file extension
24
24
  ```
25
25
 
26
26
  ## Customisation
@@ -44,7 +44,7 @@ const nunj = nunjucksAdapter({
44
44
  },
45
45
  });
46
46
 
47
- fractal.components.engine(nunj); /* set as the default template engine for components */
47
+ fractality.components.engine(nunj); /* set as the default template engine for components */
48
48
  ```
49
49
 
50
50
  For example, to register the 'shorten' filter example from the [Nujucks docs](https://mozilla.github.io/nunjucks/api.html#custom-filters):
@@ -93,7 +93,7 @@ In this example the file `foo.html` would be searched for in the `path/to/files`
93
93
 
94
94
  ## Extensions
95
95
 
96
- The following Nunjucks extensions come **automatically pre-installed**. These are often useful when building or documenting Fractal-based component libraries.
96
+ The following Nunjucks extensions come **automatically pre-installed**. These are often useful when building or documenting Fractality-based component libraries.
97
97
 
98
98
  If you **do not wish** to include these extensions, set `pristine: true` when configuring your Nunjucks adapter instance.
99
99
 
package/package.json CHANGED
@@ -1,30 +1,33 @@
1
1
  {
2
2
  "name": "@fractality/nunjucks",
3
- "version": "2.2.0",
3
+ "version": "2.2.3",
4
4
  "type": "module",
5
- "description": "Nunjucks template adapter for Fractal.",
5
+ "description": "Nunjucks template adapter for Fractalility.",
6
6
  "main": "index.js",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/frctl/fractal.git",
9
+ "url": "https://github.com/sitepark/fractality.git",
10
10
  "directory": "packages/nunjucks"
11
11
  },
12
12
  "author": "Mark Perkins <mark@clearleft.com> (http://clearleft.com/)",
13
13
  "license": "MIT",
14
14
  "bugs": {
15
- "url": "https://github.com/frctl/fractal/issues"
15
+ "url": "https://github.com/sitepark/fractality/issues"
16
16
  },
17
- "homepage": "https://github.com/frctl/fractal/tree/main/packages/nunjucks",
17
+ "homepage": "https://github.com/sitepark/fractality/tree/main/packages/nunjucks",
18
18
  "peerDependencies": {
19
- "@fractality/fractality": ">= 1.1.0-alpha.0 < 2"
19
+ "@fractality/fractality": ">= 1.5 < 2"
20
20
  },
21
21
  "dependencies": {
22
- "@fractality/core": "^0.5.0",
22
+ "@fractality/core": "0.5.3",
23
23
  "lodash": "^4.17.21",
24
24
  "nunjucks": "^3.2.4"
25
25
  },
26
+ "devDependencies": {
27
+ "@fractality/fractality": "1.6.3"
28
+ },
26
29
  "publishConfig": {
27
30
  "access": "public"
28
31
  },
29
- "gitHead": "2a5ad3e079ce7a9a418642377a6b6e07bb243c71"
32
+ "gitHead": "731216ddfcec69395c3e3e6f9b85cde374e6687e"
30
33
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- export default function (fractal) {
3
+ export default function (fractality) {
4
4
  function ContextExtension() {
5
5
  this.tags = ['context'];
6
6
 
@@ -12,7 +12,7 @@ export default function (fractal) {
12
12
  };
13
13
 
14
14
  this.run = function () {
15
- const source = fractal.components;
15
+ const source = fractality.components;
16
16
  const args = Array.from(arguments);
17
17
  const callback = args.pop();
18
18
  args.shift();
@@ -4,10 +4,10 @@ import _render from './render.js';
4
4
  import _view from './view.js';
5
5
  import _context from './context.js';
6
6
 
7
- export default function (fractal) {
7
+ export default function (fractality) {
8
8
  return {
9
- render: _render(fractal),
10
- view: _view(fractal),
11
- context: _context(fractal),
9
+ render: _render(fractality),
10
+ view: _view(fractality),
11
+ context: _context(fractality),
12
12
  };
13
13
  }
@@ -3,7 +3,7 @@
3
3
  import nunjucks from 'nunjucks';
4
4
  import { utils } from '@fractality/core';
5
5
 
6
- export default function (fractal) {
6
+ export default function (fractality) {
7
7
  function RenderExtension() {
8
8
  this.tags = ['render'];
9
9
 
@@ -15,7 +15,7 @@ export default function (fractal) {
15
15
  };
16
16
 
17
17
  this.run = function () {
18
- const source = fractal.components;
18
+ const source = fractality.components;
19
19
  const args = Array.from(arguments);
20
20
  const rootContext = args[0].ctx;
21
21
  const callback = args.pop();
@@ -2,7 +2,7 @@
2
2
 
3
3
  import nunjucks from 'nunjucks';
4
4
 
5
- export default function (fractal) {
5
+ export default function (fractality) {
6
6
  function ViewExtension() {
7
7
  this.tags = ['view'];
8
8
 
@@ -14,7 +14,7 @@ export default function (fractal) {
14
14
  };
15
15
 
16
16
  this.run = function () {
17
- const source = fractal.components;
17
+ const source = fractality.components;
18
18
  const args = Array.from(arguments);
19
19
  const callback = args.pop();
20
20
  args.shift();
@@ -2,8 +2,8 @@
2
2
 
3
3
  import pathFilter from './path.js';
4
4
 
5
- export default function (fractal) {
5
+ export default function (fractality) {
6
6
  return {
7
- path: pathFilter(fractal),
7
+ path: pathFilter(fractality),
8
8
  };
9
9
  }
@@ -3,13 +3,13 @@
3
3
  import _ from 'lodash';
4
4
  import { utils } from '@fractality/core';
5
5
 
6
- export default function (fractal) {
6
+ export default function (fractality) {
7
7
  return function (path) {
8
8
  let env = this.lookup('_env');
9
9
  let request = env.request || this.lookup('_request') || this.ctx.request;
10
10
 
11
11
  return !env || env.server
12
12
  ? path
13
- : utils.relUrlPath(path, _.get(request, 'path', '/'), fractal.web.get('builder.urls'));
13
+ : utils.relUrlPath(path, _.get(request, 'path', '/'), fractality.web.get('builder.urls'));
14
14
  };
15
15
  }