Sha256: 61dbda4939ee38a84bf8ed3f461496e658f49744e706225218b8627e96bc6d27

Contents?: true

Size: 647 Bytes

Versions: 35

Compression:

Stored size: 647 Bytes

Contents

#!/usr/bin/env node

var fs = require('fs');
var Translator = require('./lib/translator');
var util = require('util');

var basePath = __dirname + '/../apis/';
var paths = fs.readdirSync(basePath);
var modelName = process.argv[2] || '';

paths.forEach(function (path) {
  if (path.match(new RegExp(modelName + ".+\\.normal\\.json$"))) {
    var opath = path.replace(/\.normal\.json$/, '.min.json');
    var data = JSON.parse(fs.readFileSync(basePath + path).toString());
    var translated = new Translator(data, {documentation: false});
    var json = JSON.stringify(translated, null, '  ');
    fs.writeFileSync(basePath + opath, json);
  }
});

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
sumomo-0.8.7 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.8.6 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.8.4 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.8.3 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.8.2 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.8.1 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.8.0 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.7.3 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.7.2 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.7.1 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.6.4 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.6.3 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.6.2 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.6.1 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api
sumomo-0.6.0 data/sumomo/api_modules/node_modules/aws-sdk/scripts/translate-api