Skip to content

Commit

Permalink
Merge pull request #3 from OpenPathfinder/feat/export-policies
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon authored Dec 22, 2024
2 parents 2b1ac95 + 963e3cd commit 447a455
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,5 @@ dist


# CUSTOM
IGNORE/
IGNORE/
output/
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"lint": "standard",
"lint:fix": "standard --fix",
"export-policies": "node scripts/export-policies.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
Expand Down
13 changes: 13 additions & 0 deletions scripts/export-policies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const policies = require('../lib/policies')
const { writeFileSync } = require('fs')
const { join } = require('path')

const data = policies.map(policy => {
return {
name: policy.name,
description: policy.description,
technicalDetails: policy.technicalDetails
}
})

writeFileSync(join(process.cwd(), '/output/policies.json'), JSON.stringify(data, null, 2))

0 comments on commit 447a455

Please # to comment.