Désactive le watch des règles en attendant de trouver une meilleure façon de faire
parent
70650db9f6
commit
454fbe4c80
|
@ -1,3 +1,6 @@
|
|||
node_modules
|
||||
dist
|
||||
publicodes/example/
|
||||
|
||||
# TODO fix weird error in ./exoneration-covid/index.d.ts : Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
|
||||
exoneration-covid/index.d.ts
|
|
@ -1,2 +1,2 @@
|
|||
version-tag-prefix exonération-covid.publicodes -v
|
||||
version-git-message "⬆ Mise à jour du paquet \"exonération-covid.publicodes \" vers %s"
|
||||
version-tag-prefix exoneration-covid -v
|
||||
version-git-message "⬆ Mise à jour du paquet \"exoneration-covid \" vers %s"
|
||||
|
|
|
@ -43,7 +43,7 @@ function readRules() {
|
|||
|
||||
// Note: we can't put the output file in the fs.watched directory
|
||||
|
||||
function writeJSFile() {
|
||||
export default function writeJSFile() {
|
||||
const rules = readRules()
|
||||
const names = Object.keys(rules)
|
||||
const jsString = `export default ${JSON.stringify(rules, null, 2)}`
|
||||
|
@ -55,6 +55,3 @@ function writeJSFile() {
|
|||
}
|
||||
|
||||
writeJSFile()
|
||||
export function watchDottedNames() {
|
||||
return fs.watch(publicodesDir, writeJSFile)
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
// Ensure that current package version is referenced in the Changelog.md
|
||||
import { readFileSync } from 'fs'
|
||||
|
||||
const packageVersion = JSON.parse(
|
||||
readFileSync(new URL('./package.json', import.meta.url).pathname)
|
||||
).version
|
||||
const packageVersion = JSON.parse(readFileSync('./package.json')).version
|
||||
|
||||
const changelog = readFileSync(
|
||||
new URL('./CHANGELOG.md', import.meta.url).pathname
|
||||
)
|
||||
const changelog = readFileSync('./CHANGELOG.md')
|
||||
|
||||
if (!changelog.includes(`## ${packageVersion}\n`)) {
|
||||
throw Error(
|
||||
|
|
|
@ -5,7 +5,6 @@ import fs from 'fs/promises'
|
|||
import path from 'path'
|
||||
import toml from 'rollup-plugin-toml'
|
||||
import { defineConfig, Plugin } from 'vite'
|
||||
import { watchDottedNames } from '../scripts/build-rules'
|
||||
import shimReactPdf from 'vite-plugin-shim-react-pdf'
|
||||
import serveStatic from 'serve-static'
|
||||
|
||||
|
@ -162,7 +161,7 @@ function monEntrepriseDevServer(): Plugin {
|
|||
configureServer() {
|
||||
// We could use native ViteJS watch API, but it would require changing
|
||||
// more code and maybe the whole "modele-social" package build process.
|
||||
watchDottedNames()
|
||||
// watchDottedNames()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue