Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prettier-plugin-axml

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-axml

Prettier plugin for AXML

  • 1.2.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by175%
Maintainers
1
Weekly downloads
 
Created
Source

Prettier for AXML

@ali/prettier-plugin-axml 是阿里小程序模板(AXML)的 Prettier 插件。

快速开始

安装:

tnpm i --save-dev prettier @ali/prettier-plugin-axml

# 或者

yarn add --dev prettier @ali/prettier-plugin-axml

安装之后,即可通过命令行使用:

./node_modules/.bin/prettier --write "src/**/*.axml"

通常情况下,建议在 npm scripts 中增加一条:

{
  // ...
  "scripts": {
    // ...
    "format-axml": "prettier --write \"src/**/*.axml\""
  }
}

然后执行 npm run format-axml

配置项

@ali/prettier-plugin-axml 支持以下配置项:

API OptionCLI Option默认值描述
printWidth--print-width80和 Prettier 一致(查看 Prettier 文档
tabWidth--tab-width2和 Prettier 一致(查看 Prettier 文档
axmlBracketSameLine--axml-bracket-same-linefalse模板标签属性较多导致多行展示时,> 是否和最后一条属性同一行展示,类似 jsxBracketSameLine
axmlBracketSpacing--axml-bracket-spacingfalse模板的 {{}} 表达式是否增加空格,类似 JS 的 bracketSpacing

以上配置项均可添加至项目的 prettier 配置文件 中。

License

ISC。

Keywords

FAQs

Package last updated on 07 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc