From 5b083d21c6e8e4dea54fad65e6e8478163a1cf46 Mon Sep 17 00:00:00 2001 From: Ryan Tablada Date: Sun, 11 Sep 2016 16:41:42 -0500 Subject: [PATCH 1/2] Add support for Nunjucks using PrettyDiff --- src/beautifiers/prettydiff.coffee | 1 + src/languages/index.coffee | 1 + src/languages/nunjucks.coffee | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 src/languages/nunjucks.coffee diff --git a/src/beautifiers/prettydiff.coffee b/src/beautifiers/prettydiff.coffee index 0e37f03..7dadcab 100644 --- a/src/beautifiers/prettydiff.coffee +++ b/src/beautifiers/prettydiff.coffee @@ -48,6 +48,7 @@ module.exports = class PrettyDiff extends Beautifier EJS: true HTML: true Handlebars: true + Nunjucks: true XML: true SVG: true Spacebars: true diff --git a/src/languages/index.coffee b/src/languages/index.coffee index d3bbee3..f9974f9 100644 --- a/src/languages/index.coffee +++ b/src/languages/index.coffee @@ -44,6 +44,7 @@ module.exports = class Languages "markdown" 'marko' "mustache" + "nunjucks" "objective-c" "ocaml" "pawn" diff --git a/src/languages/nunjucks.coffee b/src/languages/nunjucks.coffee new file mode 100644 index 0000000..c62884f --- /dev/null +++ b/src/languages/nunjucks.coffee @@ -0,0 +1,28 @@ +console.log('loading nunjucks') + +module.exports = { + + name: "Nunjucks" + namespace: "nunjucks" + fallback: ['html','mustache'] + + ### + Supported Grammars + ### + grammars: [ + "Nunjucks", + "Nunjucks Templates", + "HTML (Nunjucks Templates)" + ] + + ### + Supported extensions + ### + extensions: [ + "njk", + "nunjucks" + ] + + options: [] + +} From a7c4ebb508de2f54ee14307badd07cbef382a146 Mon Sep 17 00:00:00 2001 From: Ryan Tablada Date: Sun, 11 Sep 2016 16:48:16 -0500 Subject: [PATCH 2/2] docs: generate docs after adding nunjucks --- README.md | 1 + docs/code/alphabetical_index.html | 75 +++- docs/code/class/Autopep8.html | 2 +- docs/code/class/Beautifier.html | 5 +- docs/code/class/Beautifiers.html | 4 +- docs/code/class/ClangFormat.html | 2 +- docs/code/class/CoffeeFmt.html | 2 +- docs/code/class/CoffeeFormatter.html | 2 +- docs/code/class/Crystal.html | 2 +- docs/code/class/Dfmt.html | 2 +- docs/code/class/ElmFormat.html | 2 +- docs/code/class/ErlTidy.html | 2 +- docs/code/class/FortranBeautifier.html | 2 +- docs/code/class/Gherkin.html | 2 +- docs/code/class/Gofmt.html | 2 +- docs/code/class/HTMLBeautifier.html | 2 +- docs/code/class/JSBeautify.html | 5 +- docs/code/class/JSCSFixer.html | 2 +- docs/code/class/LatexBeautify.html | 2 +- docs/code/class/LoadingView.html | 2 +- docs/code/class/Lua.html | 2 +- docs/code/class/MarkoBeautifier.html | 2 +- docs/code/class/MessageView.html | 2 +- docs/code/class/OCPIndent.html | 2 +- docs/code/class/PHPCBF.html | 2 +- docs/code/class/PHPCSFixer.html | 2 +- docs/code/class/PerlTidy.html | 2 +- docs/code/class/PrettyDiff.html | 4 +- docs/code/class/PugBeautify.html | 2 +- docs/code/class/PuppetFix.html | 2 +- docs/code/class/R.html | 204 +++++++++++ docs/code/class/Remark.html | 2 +- docs/code/class/Rubocop.html | 2 +- docs/code/class/RubyBeautify.html | 2 +- docs/code/class/Rustfmt.html | 2 +- docs/code/class/SassConvert.html | 210 +++++++++++ docs/code/class/Sqlformat.html | 2 +- docs/code/class/StylishHaskell.html | 2 +- docs/code/class/TidyMarkdown.html | 2 +- docs/code/class/TypeScriptFormatter.html | 2 +- docs/code/class/Uncrustify.html | 2 +- docs/code/class/VueBeautifier.html | 196 +++++++++++ docs/code/class/Yapf.html | 2 +- docs/code/class_list.html | 36 ++ docs/code/extra/CHANGELOG.md.html | 4 +- docs/code/extra/README.md.html | 57 ++- .../file/src/beautifiers/autopep8.coffee.html | 2 +- .../src/beautifiers/beautifier.coffee.html | 2 +- .../src/beautifiers/clang-format.coffee.html | 2 +- .../src/beautifiers/coffee-fmt.coffee.html | 2 +- .../beautifiers/coffee-formatter.coffee.html | 2 +- .../file/src/beautifiers/crystal.coffee.html | 2 +- .../file/src/beautifiers/csscomb.coffee.html | 2 +- .../file/src/beautifiers/dfmt.coffee.html | 2 +- .../src/beautifiers/elm-format.coffee.html | 2 +- .../file/src/beautifiers/erl_tidy.coffee.html | 2 +- .../src/beautifiers/formatR/index.coffee.html | 125 +++++++ .../fortran-beautifier/index.coffee.html | 2 +- .../file/src/beautifiers/gherkin.coffee.html | 2 +- .../file/src/beautifiers/gofmt.coffee.html | 2 +- .../beautifiers/htmlbeautifier.coffee.html | 2 +- .../file/src/beautifiers/index.coffee.html | 2 +- .../src/beautifiers/js-beautify.coffee.html | 2 +- .../file/src/beautifiers/jscs.coffee.html | 2 +- .../beautifiers/latex-beautify.coffee.html | 2 +- .../lua-beautifier/index.coffee.html | 2 +- .../beautifiers/marko-beautifier.coffee.html | 2 +- .../src/beautifiers/ocp-indent.coffee.html | 2 +- .../file/src/beautifiers/perltidy.coffee.html | 2 +- .../src/beautifiers/php-cs-fixer.coffee.html | 2 +- .../file/src/beautifiers/phpcbf.coffee.html | 2 +- .../src/beautifiers/prettydiff.coffee.html | 2 +- .../src/beautifiers/pug-beautify.coffee.html | 2 +- .../src/beautifiers/puppet-fix.coffee.html | 2 +- .../file/src/beautifiers/remark.coffee.html | 2 +- .../file/src/beautifiers/rubocop.coffee.html | 2 +- .../src/beautifiers/ruby-beautify.coffee.html | 2 +- .../file/src/beautifiers/rustfmt.coffee.html | 2 +- .../src/beautifiers/sass-convert.coffee.html | 123 +++++++ .../src/beautifiers/sqlformat.coffee.html | 2 +- .../beautifiers/stylish-haskell.coffee.html | 2 +- .../src/beautifiers/tidy-markdown.coffee.html | 2 +- .../typescript-formatter.coffee.html | 2 +- .../beautifiers/uncrustify/cfg.coffee.html | 2 +- .../beautifiers/uncrustify/index.coffee.html | 2 +- .../beautifiers/vue-beautifier.coffee.html | 123 +++++++ .../file/src/beautifiers/yapf.coffee.html | 2 +- docs/code/file/src/beautify.coffee.html | 2 +- docs/code/file/src/config.coffee.html | 4 +- docs/code/file/src/languages/apex.coffee.html | 2 +- .../file/src/languages/arduino.coffee.html | 2 +- .../file/src/languages/c-sharp.coffee.html | 2 +- docs/code/file/src/languages/c.coffee.html | 2 +- .../src/languages/coffeescript.coffee.html | 2 +- .../file/src/languages/coldfusion.coffee.html | 2 +- docs/code/file/src/languages/cpp.coffee.html | 2 +- .../file/src/languages/crystal.coffee.html | 2 +- docs/code/file/src/languages/css.coffee.html | 9 +- docs/code/file/src/languages/csv.coffee.html | 2 +- docs/code/file/src/languages/d.coffee.html | 2 +- docs/code/file/src/languages/ejs.coffee.html | 2 +- docs/code/file/src/languages/elm.coffee.html | 2 +- docs/code/file/src/languages/erb.coffee.html | 2 +- .../file/src/languages/erlang.coffee.html | 2 +- .../file/src/languages/fortran.coffee.html | 4 +- .../file/src/languages/gherkin.coffee.html | 2 +- docs/code/file/src/languages/go.coffee.html | 2 +- .../file/src/languages/handlebars.coffee.html | 2 +- .../file/src/languages/haskell.coffee.html | 2 +- docs/code/file/src/languages/html.coffee.html | 4 +- .../code/file/src/languages/index.coffee.html | 2 +- docs/code/file/src/languages/jade.coffee.html | 2 +- docs/code/file/src/languages/java.coffee.html | 2 +- .../file/src/languages/javascript.coffee.html | 2 +- docs/code/file/src/languages/json.coffee.html | 2 +- docs/code/file/src/languages/jsx.coffee.html | 2 +- .../code/file/src/languages/latex.coffee.html | 2 +- docs/code/file/src/languages/less.coffee.html | 2 +- docs/code/file/src/languages/lua.coffee.html | 2 +- .../file/src/languages/markdown.coffee.html | 2 +- .../code/file/src/languages/marko.coffee.html | 2 +- .../file/src/languages/mustache.coffee.html | 2 +- .../file/src/languages/nunjucks.coffee.html | 139 ++++++++ .../src/languages/objective-c.coffee.html | 2 +- .../code/file/src/languages/ocaml.coffee.html | 2 +- docs/code/file/src/languages/pawn.coffee.html | 2 +- docs/code/file/src/languages/perl.coffee.html | 2 +- docs/code/file/src/languages/php.coffee.html | 2 +- .../file/src/languages/puppet.coffee.html | 2 +- .../file/src/languages/python.coffee.html | 2 +- docs/code/file/src/languages/r.coffee.html | 172 +++++++++ .../file/src/languages/riotjs.coffee.html | 2 +- docs/code/file/src/languages/ruby.coffee.html | 2 +- docs/code/file/src/languages/rust.coffee.html | 2 +- docs/code/file/src/languages/sass.coffee.html | 6 +- docs/code/file/src/languages/scss.coffee.html | 2 +- .../file/src/languages/spacebars.coffee.html | 2 +- docs/code/file/src/languages/sql.coffee.html | 2 +- docs/code/file/src/languages/svg.coffee.html | 2 +- docs/code/file/src/languages/swig.coffee.html | 2 +- docs/code/file/src/languages/tss.coffee.html | 2 +- docs/code/file/src/languages/twig.coffee.html | 2 +- .../file/src/languages/typescript.coffee.html | 2 +- docs/code/file/src/languages/vala.coffee.html | 2 +- .../src/languages/visualforce.coffee.html | 2 +- docs/code/file/src/languages/vue.coffee.html | 139 ++++++++ docs/code/file/src/languages/xml.coffee.html | 6 +- .../file/src/languages/xtemplate.coffee.html | 2 +- .../file/src/views/loading-view.coffee.html | 2 +- .../file/src/views/message-view.coffee.html | 2 +- docs/code/file_list.html | 56 +++ docs/code/javascript/search.js | 2 +- docs/code/method_list.html | 328 ++++++++++-------- docs/options.md | 177 ++++++++++ package.json | 5 +- 155 files changed, 2160 insertions(+), 315 deletions(-) create mode 100644 docs/code/class/R.html create mode 100644 docs/code/class/SassConvert.html create mode 100644 docs/code/class/VueBeautifier.html create mode 100644 docs/code/file/src/beautifiers/formatR/index.coffee.html create mode 100644 docs/code/file/src/beautifiers/sass-convert.coffee.html create mode 100644 docs/code/file/src/beautifiers/vue-beautifier.coffee.html create mode 100644 docs/code/file/src/languages/nunjucks.coffee.html create mode 100644 docs/code/file/src/languages/r.coffee.html create mode 100644 docs/code/file/src/languages/vue.coffee.html diff --git a/README.md b/README.md index 4c8173f..be98a62 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ See [all supported options in the documentation at `docs/options.md`](https://g | Markdown | `GitHub Markdown` |`.markdown`, `.md` | [`Remark`](https://github.com/wooorm/remark), [`Tidy Markdown`](https://github.com/slang800/tidy-markdown) (Default) | | Marko | `Marko` |`.marko` | [`Marko Beautifier`](https://github.com/marko-js/marko-prettyprint) (Default) | | Mustache | `HTML (Mustache)` |`.mustache` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default) | +| Nunjucks | `Nunjucks`, `Nunjucks Templates`, `HTML (Nunjucks Templates)` |`.njk`, `.nunjucks` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Objective-C | `Objective-C`, `Objective-C++` |`.m`, `.mm`, `.h` | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default), [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) | | OCaml | `OCaml` |`.ml` | [`ocp-indent`](https://www.typerex.org/ocp-indent.html) (Default) | | Pawn | `Pawn` | | [`Uncrustify`](https://github.com/uncrustify/uncrustify) (Default) | diff --git a/docs/code/alphabetical_index.html b/docs/code/alphabetical_index.html index 08f4fe0..ac4af5e 100644 --- a/docs/code/alphabetical_index.html +++ b/docs/code/alphabetical_index.html @@ -245,6 +245,11 @@