@superdesk/build-tools
Advanced tools
Comparing version 1.0.16 to 1.0.17
{ | ||
"name": "@superdesk/build-tools", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -12,2 +12,3 @@ #!/usr/bin/env node | ||
const {namespaceCSS, watchCSS} = require('./extensions/css'); | ||
const {generateInstanceConfigurationSchema} = require('./generate-instance-configuration-schema'); | ||
@@ -30,2 +31,10 @@ const {Command} = require('commander'); | ||
program.command('generate-instance-configuration-schema <main-client-dir>') | ||
.description('reads typescript interfaces and generates JSON schema that will be used to generate the UI') | ||
.action((mainClientDir) => { | ||
const clientDirAbs = path.join(currentDir, mainClientDir); | ||
generateInstanceConfigurationSchema(clientDirAbs); | ||
}); | ||
program.command('po-to-json <source-dir-po> <output-dir-json>') | ||
@@ -44,5 +53,5 @@ .description('convert .po files in the directory to .json format that is used by Superdesk') | ||
const clientDirAbs = path.join(currentDir, mainClientDir); | ||
const poDir = path.join(clientDirAbs, 'node_modules/superdesk-core/po'); | ||
const translationsDir = path.join(currentDir, mainClientDir, 'dist/languages'); | ||
generateInstanceConfigurationSchema(clientDirAbs); | ||
// build will fail if extensions are not installed | ||
@@ -57,2 +66,5 @@ installExtensions(clientDirAbs); | ||
const poDir = path.join(clientDirAbs, 'node_modules/superdesk-core/po'); | ||
const translationsDir = path.join(currentDir, mainClientDir, 'dist/languages'); | ||
// translationsDir is only created after the build and would get removed if created before build | ||
@@ -59,0 +71,0 @@ poToJson(poDir, translationsDir); |
25865
10
599
15
4