Skip to content

Commit

Permalink
Updated to use prettier instead of beautify (handles MD inside postma…
Browse files Browse the repository at this point in the history
…n description)
  • Loading branch information
Phara0h committed Jul 7, 2020
1 parent 102ac6c commit 5c7e407
Show file tree
Hide file tree
Showing 312 changed files with 12 additions and 53,184 deletions.
11 changes: 6 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs') // needed to read JSON file from disk
const Collection = require('postman-collection').Collection;
const beautify = require('beautify');
const prettier = require("prettier");

// Load a collection to memory from a JSON file on disk (say, sample-collection.json)
var collection = new Collection(JSON.parse(fs.readFileSync(process.argv[2]).toString())).toJSON();
Expand Down Expand Up @@ -134,6 +134,7 @@ var getDocs = function (name, description, url, body, headers = [])
`
/**
* ${setMethodName(name)} - ${description}
*
* Path: ${url.path.join('/')}`

var vars = [];
Expand All @@ -151,8 +152,8 @@ var getDocs = function (name, description, url, body, headers = [])
docs +=
`
* @param {Object} body`
}
}
}

var varsString = '';

Expand Down Expand Up @@ -395,7 +396,7 @@ jsFile += `
}
`

console.log(beautify(jsFile,
{
format: 'js'
console.log(prettier.format(jsFile, {
tabWidth: 2,
singleQuote: true
}));
1 change: 0 additions & 1 deletion node_modules/.bin/beautify

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/css-beautify

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/cssbeautify

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/html

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/html-beautify

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/js-beautify

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/mkdirp

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/nopt

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/semver

This file was deleted.

46 changes: 0 additions & 46 deletions node_modules/abbrev/LICENSE

This file was deleted.

23 changes: 0 additions & 23 deletions node_modules/abbrev/README.md

This file was deleted.

61 changes: 0 additions & 61 deletions node_modules/abbrev/abbrev.js

This file was deleted.

59 changes: 0 additions & 59 deletions node_modules/abbrev/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions node_modules/balanced-match/.npmignore

This file was deleted.

21 changes: 0 additions & 21 deletions node_modules/balanced-match/LICENSE.md

This file was deleted.

91 changes: 0 additions & 91 deletions node_modules/balanced-match/README.md

This file was deleted.

Loading

0 comments on commit 5c7e407

Please sign in to comment.