Skip to content

Commit

Permalink
test(optim): add optimizedTargets
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileRolley committed Feb 7, 2023
1 parent 7fe2fe2 commit 5062b4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/modelOptim.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function constantFoldingFromJSONFile(
const engine = new Engine(rules, { logger: disabledLogger })

log('Constant folding pass...')
const foldedRules = constantFolding(engine /* , targets */)
const foldedRules = constantFolding(engine, targets)

console.log(
'[AFTER]: alimentation . plats . végétalien . nombre:',
Expand Down
9 changes: 8 additions & 1 deletion scripts/rulesToJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ function compressRules(jsonPathWithoutExtension, destLang) {
const err = constantFoldingFromJSONFile(
jsonPathWithoutExtension + '.json',
destPath,
['**/translated-*.yaml']
['**/translated-*.yaml'],
[
'bilan',
'actions',
'transport',
'pétrole . pleins',
'transport . voiture . thermique',
]
)

if (err) {
Expand Down

0 comments on commit 5062b4c

Please sign in to comment.