Skip to content

yanecc/vfox-crystal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vfox-crystal

Crystal language plugin for vfox.

Support Crystal ≥ 0.24.2 and Nightly Builds (≥ 1.3.0 for Windows).

Install

After installing vfox, install the plugin by running:

vfox add crystal

Next, search and select the version to install. By default, vfox keeps cache for available versions, use --no-cache flag to search without cache and rebuild the cache.

vfox search crystal
vfox search crystal --no-cache

Install the latest stable version with latest tag.

vfox install crystal@latest

To install nightly builds, use dev or nightly tag, or use the system date tag.

vfox install crystal@dev
vfox install crystal@nightly
vfox install crystal@20240501

They are the same and will install nightly builds labelled with the current date. Use it with:

vfox use crystal@20240501

Some environment variables are served as following:

Environment variables Default value Description
GITHUB_URL https://github.com/ GitHub mirror URL
GITHUB_TOKEN personal GitHub token

Note

Since vfox-crystal 0.4.1, GitHub token is no longer a necessity, but you can still set it via the GITHUB_TOKEN environment variable or modifying the plugin asset for efficiency. Search with --no-cache flag to see the changes straight away.

sed -i 's/githubToken = os.getenv("GITHUB_TOKEN") or "",/githubToken = os.getenv("GITHUB_TOKEN") or "<YOUR_GITHUB_TOKEN>",/' ~/.version-fox/plugin/crystal/lib/util.lua

This will:

  1. accelerate getting the latest version
  2. accelerate fetching available versions
  3. enable installing nightly builds on Windows