@vituum/vite-plugin-latte 0.1.12 → 0.1.14

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.
Files changed (3) hide show
  1. package/index.js +2 -2
  2. package/index.php +6 -0
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -97,7 +97,7 @@ const latte = (params = {}) => {
97
97
  path = path.replace('?raw', '')
98
98
  filename = filename.replace('?raw', '')
99
99
 
100
- const start = new Date()
100
+ // const start = new Date()
101
101
 
102
102
  if (
103
103
  !params.filetypes.html.test(path) &&
@@ -116,7 +116,7 @@ const latte = (params = {}) => {
116
116
  const renderLatte = renderTemplate(path, params, content)
117
117
  const warningLog = renderLatte.output.includes('Warning: Undefined')
118
118
 
119
- console.info(`${chalk.cyan('@vituum/vite-plugin-latte')} ${chalk.green(`finished in ${chalk.grey(new Date() - start + 'ms')}`)}`)
119
+ // console.info(`${chalk.cyan('@vituum/vite-plugin-latte')} ${chalk.green(`finished in ${chalk.grey(new Date() - start + 'ms')}`)}`)
120
120
 
121
121
  if (renderLatte.error || warningLog) {
122
122
  if (!server) {
package/index.php CHANGED
@@ -143,6 +143,12 @@ foreach ($config->functions as $function => $path) {
143
143
  }
144
144
  }
145
145
 
146
+ $translator = static function (string $original): string {
147
+ return $original;
148
+ };
149
+
150
+ $latte->addExtension(new Latte\Essential\TranslatorExtension($translator));
151
+
146
152
  $tag = 'json';
147
153
  require PACKAGE_DIR . '/latte/' . ucfirst($tag) . 'Tag.php';
148
154
  eval('$latte->addExtension(new App\Latte\\' . ucfirst($tag) . 'Extension);');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vituum/vite-plugin-latte",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "scripts": {