Files
shields/scripts/export-service-definitions-cli.js
Paul Melnikow 4bd16f93e8 Sort imports and requires (#3056)
This will definitely save time, and ensure more uniformity.

It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter.

Closes #2701
2019-02-21 22:14:40 -05:00

13 lines
368 B
JavaScript

'use strict'
const yaml = require('js-yaml')
const { collectDefinitions } = require('../core/base-service/loader')
const definitions = collectDefinitions()
// Omit undefined
// https://github.com/nodeca/js-yaml/issues/356#issuecomment-312430599
const cleaned = JSON.parse(JSON.stringify(definitions))
process.stdout.write(yaml.safeDump(cleaned, { flowLevel: 5 }))