Giter Site home page Giter Site logo

prettier's Introduction


prettier-plugin-marko
TypeScript Styled with prettier Build status NPM Version Downloads

A Prettier plugin for parsing and printing Marko files.

Installation

npm

npm install prettier prettier-plugin-marko -D

yarn

yarn add prettier prettier-plugin-marko -D

Usage

NPM 6

npx --no-install prettier --write "**/*.marko"

NPM 7

npm exec -- prettier --write "**/*.marko"

Yarn

yarn prettier  --write "**/*.marko"

Editors

Editors such as Atom and VSCode provide plugins for calling Prettier directly from your editor.

If you'd like to use these plugins without installing prettier-plugin-marko in the project, you can also install prettier-plugin-marko globally with either npm, yarn or your package manager choice.

Options

On top of Prettier's options, there are a few additional options picked up by this plugin.

markoSyntax: "auto" | "html" | "concise"

Marko supports both an html like and concise syntaxes. By default this plugin will try to detect the syntax you are already using and output a formatted document in that syntax.

You can overide the default ("auto") to enforce that all templates are formatted to the syntax of your choosing.

markoAttrParen: boolean

For the most part Marko is very flexible when it comes to the expressions uses within attributes. By default this plugin will not wrap attribute values in parenthesis unless absolutely necessary. By setting this value to true it will instead output parenthesis whenever the attribute value contains any unenclosed whitespace.

Code of Conduct

This project adheres to the eBay Code of Conduct. By participating in this project you agree to abide by its terms.

prettier's People

Contributors

dylanpiercey avatar lulavalva avatar nick-mazuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.