vite-plugin-twig-drupal 1.1.0 โ 1.2.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/.github/workflows/node.js.yml +4 -0
- package/README.md +11 -1
- package/package.json +3 -3
|
@@ -10,6 +10,7 @@ jobs:
|
|
|
10
10
|
strategy:
|
|
11
11
|
matrix:
|
|
12
12
|
node: [18, 20]
|
|
13
|
+
vite: [4, 5]
|
|
13
14
|
runs-on: ubuntu-latest
|
|
14
15
|
steps:
|
|
15
16
|
- name: ๐ Cancel Previous Runs
|
|
@@ -28,6 +29,9 @@ jobs:
|
|
|
28
29
|
with:
|
|
29
30
|
useLockFile: false
|
|
30
31
|
|
|
32
|
+
- name: โก๏ธ Setup vite
|
|
33
|
+
run: npm install vite@${{ matrix.vite }}
|
|
34
|
+
|
|
31
35
|
- name: ๐งน Linting
|
|
32
36
|
run: npm run lint
|
|
33
37
|
|
package/README.md
CHANGED
|
@@ -90,7 +90,17 @@ export default defineConfig({
|
|
|
90
90
|
},
|
|
91
91
|
// Optional if you are using React storybook renderer. The default is 'html' and works with storybook's html
|
|
92
92
|
// renderer.
|
|
93
|
-
// framework: 'react'
|
|
93
|
+
// framework: 'react'
|
|
94
|
+
functions: {
|
|
95
|
+
// You can add custom functions - each is a function that is passed the active Twig instance and should call
|
|
96
|
+
// e.g. extendFunction to register a function
|
|
97
|
+
reverse: (twigInstance) => twigInstance.extendFunction("reverse", () => (text) => text.split(' ').reverse().join(' ')),
|
|
98
|
+
},
|
|
99
|
+
globalContext: {
|
|
100
|
+
// Global variables that should be present in all templates.
|
|
101
|
+
active_theme: 'my_super_theme',
|
|
102
|
+
is_front_page: false,
|
|
103
|
+
},
|
|
94
104
|
}),
|
|
95
105
|
// Other vite plugins.
|
|
96
106
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-twig-drupal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Provides a โก๏ธ Vite plugin to transform ๐ฑ Twig into HTML with a ๐ง Drupal flavour",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Vite",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"twig": "^1.16.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"vite": "^4.4.11"
|
|
34
|
+
"vite": "^4.4.11 || ^5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"prettier": "^3.0.3",
|
|
38
38
|
"semantic-release": "^22.0.5",
|
|
39
|
-
"vite": "^4.4.11",
|
|
39
|
+
"vite": "^4.4.11 || ^ 5",
|
|
40
40
|
"vitest": "^0.34.6"
|
|
41
41
|
}
|
|
42
42
|
}
|