Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enpitsulin/prettier-plugin-tact
Prettier plugin for tact lang
https://github.com/enpitsulin/prettier-plugin-tact
prettier-plugin tact
Last synced: about 2 months ago
JSON representation
Prettier plugin for tact lang
- Host: GitHub
- URL: https://github.com/enpitsulin/prettier-plugin-tact
- Owner: enpitsuLin
- License: mit
- Created: 2024-06-25T10:29:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-19T06:52:11.000Z (6 months ago)
- Last Synced: 2024-11-11T22:53:31.568Z (about 2 months ago)
- Topics: prettier-plugin, tact
- Language: TypeScript
- Homepage:
- Size: 410 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prettier-plugin-tact
A [prettier plugin](https://prettier.io/docs/en/plugins.html) for automatically formatting your [tact](https://github.com/tact-lang/tact) code.
## Installation
Install both `prettier` and `prettier-plugin-tact`:
```Bash
npm install --save-dev prettier prettier-plugin-tact
// or by pnpm
pnpm add -D prettier prettier-plugin-tact
```### Activate the plugin
Create or modify your [prettier configuration file](https://prettier.io/docs/en/configuration) to activate the plugin:
```json
{
"plugins": ["prettier-plugin-tact"]
}
```## Usage
If you installed prettier as a local dependency, you can add prettier as a script in your package.json,
```json
{
"scripts": {
"prettier": "prettier"
}
}
```Run prettier for your contracts files by command or you can add this to you script if you prefer:
```Bash
npm run prettier -- path/to/file.tact --write
# or
pnpm prettier path/to/file.tact --write
```> Prettier only works with valid code. If there is a syntax error, nothing will be done and a parser error will be thrown.
### Notice
Before [`tree-sitter-tact` be publishing to npm registry](https://github.com/tact-lang/tree-sitter-tact/issues/12), you should install `tree-sitter-tact` from GitHub repo by:
```sh
npm install -D https://github.com/tact-lang/tree-sitter-tact
```## License
Distributed under the MIT license. See [LICENSE](LICENSE) for more information.