@modernpoacher/nunjucks 3.3.3 → 3.3.4

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 CHANGED
@@ -22,22 +22,24 @@ server.register(Vision)
22
22
  .then(() => {
23
23
  server.views({
24
24
  relativeTo: currentDir,
25
- path: path.join(__dirname, 'views'),
26
- engines: {
27
- html: {
28
- module: Nunjucks
29
- }
25
+ path: path.join(__dirname, 'views'),
26
+ engines: {
27
+ html: {
28
+ module: Nunjucks
30
29
  }
31
- })
30
+ }
31
+ })
32
32
 
33
33
  server.route({
34
34
  method: 'GET',
35
35
  path: '/test',
36
- handler: (request, h) => (
37
- h.view('mytemplate', {
38
- myvariable: 'myvalue'
39
- })
40
- )
36
+ handler (request, h) {
37
+ return (
38
+ h.view('mytemplate', {
39
+ myvariable: 'myvalue'
40
+ })
41
+ )
42
+ }
41
43
  })
42
44
  })
43
45
  .then(() => server.start())
@@ -64,22 +66,24 @@ server.register(Vision)
64
66
  .then(() => {
65
67
  server.views({
66
68
  relativeTo: currentDir,
67
- path: viewPath,
68
- engines: {
69
- html: {
70
- module: Nunjucks
71
- }
69
+ path: viewPath,
70
+ engines: {
71
+ html: {
72
+ module: Nunjucks
72
73
  }
73
- })
74
+ }
75
+ })
74
76
 
75
77
  server.route({
76
78
  method: 'GET',
77
79
  path: '/test',
78
- handler: (request, h) => (
79
- h.view('mytemplate', {
80
- myvariable: 'myvalue'
81
- })
82
- )
80
+ handler (request, h) {
81
+ return (
82
+ h.view('mytemplate', {
83
+ myvariable: 'myvalue'
84
+ })
85
+ )
86
+ }
83
87
  })
84
88
  })
85
89
  .then(() => server.start())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/nunjucks",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "description": "Nunjucks for Hapi",
5
5
  "keywords": [
6
6
  "hapi",
@@ -29,9 +29,9 @@
29
29
  "debug": "^4.4.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@sequencemedia/eslint-config-standard": "^0.2.47",
32
+ "@sequencemedia/eslint-config-standard": "^0.2.48",
33
33
  "@types/debug": "^4.1.12",
34
- "eslint": "^9.23.0",
34
+ "eslint": "^9.24.0",
35
35
  "globals": "^16.0.0",
36
36
  "husky": "^9.1.7"
37
37
  },
@@ -1,19 +0,0 @@
1
- #!/bin/sh
2
-
3
- get_package_changes () {
4
- local CURRENT_BRANCH
5
- CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
6
-
7
- git diff HEAD~1..HEAD~0 -- "origin/$CURRENT_BRANCH" package.json
8
- }
9
-
10
- has_package_changes () {
11
- [ ! -z "$(get_package_changes)" ]
12
- }
13
-
14
- if has_package_changes;
15
- then
16
- git clone https://github.com/modernpoacher/hooks.git .husky/hooks
17
- npx cross-env DEBUG=@modernpoacher/hooks* node .husky/hooks/post-commit.mjs
18
- rm -rf .husky/hooks
19
- fi
package/.husky/pre-commit DELETED
@@ -1,3 +0,0 @@
1
- #!/bin/sh
2
-
3
- npm run lint
@@ -1,20 +0,0 @@
1
- # Publish to NPM
2
-
3
- For CircleCI or the shell
4
-
5
- If you need an _authentication token_ to publish then you should resolve that before executing this script
6
-
7
- ```bash
8
- echo ".publish/publish.sh" >> .npmignore
9
- git clone https://github.com/modernpoacher/publish.git .publish
10
- .publish/publish.sh
11
- ```
12
-
13
- A Gist with the same content as `publish.sh` may need an additional step
14
-
15
- ```bash
16
- echo ".publish/publish.sh" >> .npmignore
17
- git clone https://gist.github.com/efd85e2b8da1ee830dd637f134994a9d.git .publish
18
- chmod +x .publish/publish.sh
19
- .publish/publish.sh
20
- ```