diff --git a/.gitignore b/.gitignore index ecb138f..7530bf3 100644 --- a/.gitignore +++ b/.gitignore @@ -131,4 +131,5 @@ dist # CUSTOM -IGNORE/ \ No newline at end of file +IGNORE/ +output/ \ No newline at end of file diff --git a/package.json b/package.json index 6d6cc12..f19c70d 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/scripts/export-policies.js b/scripts/export-policies.js new file mode 100644 index 0000000..50b4ced --- /dev/null +++ b/scripts/export-policies.js @@ -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))