Skip to content

Commit 218d2f7

Browse files
authored
Merge pull request #84 from mbland/use-rollup-plugin-handlebars-precompiler-npm
Use rollup-plugin-handlebars-precompiler npm
2 parents b0f1709 + 5cbb490 commit 218d2f7

File tree

4 files changed

+17
-193
lines changed

4 files changed

+17
-193
lines changed

strcalc/src/main/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"handlebars": "^4.7.8",
4545
"jsdoc-cli-wrapper": "^1.0.4",
4646
"jsdom": "^23.1.0",
47+
"rollup-plugin-handlebars-precompiler": "^1.0.0",
4748
"test-page-opener": "^1.0.3",
4849
"vite": "^5.0.11",
4950
"vitest": "^1.1.3",

strcalc/src/main/frontend/plugins/rollup-plugin-handlebars-precompiler.js

Lines changed: 0 additions & 185 deletions
This file was deleted.

strcalc/src/main/frontend/pnpm-lock.yaml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

strcalc/src/main/frontend/vite.config.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import handlebarsPrecompiler from
2-
'./plugins/rollup-plugin-handlebars-precompiler.js'
1+
import HandlebarsPrecompiler from 'rollup-plugin-handlebars-precompiler'
32
import { defineConfig } from 'vite'
4-
import { configDefaults } from 'vitest/config'
53
import fs from 'node:fs'
64
import os from 'node:os'
75
import path from 'node:path/posix'
@@ -69,7 +67,7 @@ function getProviderOptions(){
6967
export default defineConfig({
7068
base: '/strcalc/',
7169
plugins: [
72-
handlebarsPrecompiler({ helpers: ['components/helpers.js'] })
70+
HandlebarsPrecompiler({ helpers: ['components/helpers.js'] })
7371
],
7472
define: {
7573
STRCALC_BACKEND: JSON.stringify(process.env.STRCALC_BACKEND)
@@ -84,10 +82,7 @@ export default defineConfig({
8482
test: {
8583
outputFile: buildDir('test-results/test-frontend/TESTS-TestSuites.xml'),
8684
coverage: {
87-
reportsDirectory: buildDir('reports/frontend/coverage'),
88-
// Remove 'exclude:' once rollup-plugin-handlebars-precompile
89-
// and bin/jsdoc-cli-wrapper.js move into their own repositories.
90-
exclude: [ ...configDefaults.coverage.exclude, 'plugins/*', 'bin/*' ]
85+
reportsDirectory: buildDir('reports/frontend/coverage')
9186
},
9287
server: {
9388
deps: {

0 commit comments

Comments
 (0)