-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Genero txt-to-sql-defaults.yaml con defyaml.js
- Loading branch information
Showing
9 changed files
with
266 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
columnNamesFormat: lowercased_names | ||
separator: false | ||
includePrimaryKey: true | ||
columnAlignedCommas: false | ||
columnAlignedMaxWidth: 100 | ||
outputEngine: postgresql | ||
verboseErrors: false | ||
inputEncoding: false | ||
outputEncoding: false | ||
addDropTable: false | ||
ignoreNullLines: false | ||
columnNamesFormat: lowercased_names | ||
separator: false | ||
includePrimaryKey: true | ||
columnAlignedCommas: false | ||
columnAlignedMaxWidth: 100 | ||
outputEngine: postgresql | ||
verboseErrors: false | ||
inputEncoding: false | ||
outputEncoding: false | ||
addDropTable: false | ||
ignoreNullLines: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"use strict"; | ||
|
||
var txtToSql = require('../lib/txt-to-sql.js'); | ||
var jsYaml = require('js-yaml'); | ||
var Promises = require('best-promise'); | ||
require('fs-extra'); | ||
var fs = require('fs-promise'); | ||
|
||
var Path = require('path'); | ||
|
||
function createDefaultYaml() { | ||
var defaultYaml = Path.resolve('./lib/txt-to-sql-defaults.yaml'); | ||
console.log("Generating '"+defaultYaml+"'..."); | ||
return fs.writeFile(defaultYaml, jsYaml.safeDump(txtToSql.defaultOpts), {encoding:'utf8'}).then(function() { | ||
console.log("listo.") | ||
}).catch(function(err) { | ||
console.log("Error", err, err.stack); | ||
process.exit(1); | ||
}); | ||
} | ||
|
||
createDefaultYaml(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.