Crystal
2023-3-19 04:3:0 Author: www.hahwul.com(查看原文) 阅读量:0 收藏

Resources

Extension of vscode

  • https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang
    • https://github.com/elbywan/crystalline (Language Server)
  • https://marketplace.visualstudio.com/items?itemName=veelenga.crystal-ameba

Shards

  • Amber
    • A full-featured web framework
    • Like Rails
  • Lucky
    • A full-featured web framework
    • Like Rails
  • Kemal
    • Simple Web Framework
    • Like Sinatra
  • Ameba
    • Code style linter
    • Like Ruby’s Rubocop
  • Crest
    • HTTP Client
    • Like Ruby’s RestClient

Snipppets

Build project

# using crystal
crystal build --no-debug --release

# using shards
shards build --no-debug --release

Release build

shards build --release --no-debug --production

#    --frozen                         Strictly installs locked versions from shard.lock.
#    --without-development            Does not install development dependencies.
#    --production                     same as `--frozen --without-development`

Unit test

# Basic
crystal spec

# Verbose
crsytal spec -v

Format

Linting with ameba

# Installation
# brew tap crystal-ameba/ameba
# brew install ameba

ameba

# Auto fix
ameba --fix

文章来源: https://www.hahwul.com/cullinan/crystal
如有侵权请联系:admin#unsafe.sh