Skip to content

Commit

Permalink
Language table (#72)
Browse files Browse the repository at this point in the history
* Adjust Goreleaser config

* Change language list to language table

* Adjust publish workflow

* Fix language table

* Remove unused docs pages
  • Loading branch information
marcauberer authored Aug 25, 2021
1 parent 6c8c6f2 commit c98ecc1
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Java CI
on:
push:
paths:
- 'compiler/java/**'
- compiler/java/**
pull_request:
branches: [ main, dev, feature/** ]

Expand All @@ -19,8 +19,8 @@ jobs:
- name: Set up JDK 15
uses: actions/setup-java@v2
with:
java-version: '15'
distribution: 'adopt'
java-version: 15
distribution: adopt

- name: Cache Maven packages
uses: actions/cache@v2
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Publish documentation

name: Publish documentation

on:
Expand All @@ -18,12 +17,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: pip install mkdocs-material mkdocs-minify-plugin

- name: Build and deploy
run: |
cd docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
exclude: ./cli/vendor/**
locale: "US"
locale: US
9 changes: 4 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Publish Compiler binaries

name: Release - Cross compilation

on:
Expand All @@ -16,7 +15,7 @@ jobs:
arch_name:
- linux-arm64
- linux-armv5
#- linux-armv6
- linux-armv6
- linux-armv7
- linux-x86
- linux-x64
Expand Down Expand Up @@ -85,7 +84,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- name: Restore Go modules cache
uses: actions/cache@v1
Expand Down Expand Up @@ -132,7 +131,7 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: v0.174.2
version: v0.176.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -162,7 +161,7 @@ jobs:
- 386
- arm64
- armv5
#- armv6
- armv6
- armv7
steps:
- name: Get version name
Expand Down
9 changes: 7 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ builds:
- 386
goarm:
- 5
#- 6 # Waiting for third party fix
- 6
- 7
env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
ldflags:
- -s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }} -X main.date={{ .CommitDate }} -X main.builtBy=github-actions
Expand Down Expand Up @@ -139,7 +141,10 @@ docker_manifests:
release:
name_template: v{{ .Tag }}
prerelease: auto
footer: Visit [ccom.compose-generator.com](https://ccom.compose-generator.com) to test out the new features!
footer: |
---
__Visit [ccom.compose-generator.com](https://ccom.compose-generator.com) to test the new features!__
announce:
twitter:
enabled: true
Expand Down
6 changes: 0 additions & 6 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@

# Introduction
CCom is a language that allows you to define conditional sections in common data formats, which do not allow logic by default. It acts like a pre-processor and can evaluate your conditional expressions, based on a JSON data object that you can pass to CCom alongside an input file. In order to get started, visit our [quick-start guide](../quick-start).

Here you can see a demo, how to use CCom to process a YAML data file with conditional sections:

<script id="asciicast-407484" src="https://asciinema.org/a/407484.js" async></script>

If this is what you are looking for, go ahead and read the [quick-start guide](../quick-start).
5 changes: 0 additions & 5 deletions docs/docs/quick-start.md

This file was deleted.

22 changes: 8 additions & 14 deletions docs/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,14 @@ CCom accepts data in the JSON format only, but you can give it to the cli in one
## Language
As CCom does not know the content type of your input file, you sometimes have to specify the files language or the comment identifiers. CCom is smart enough to recognize the language for some file extensions, but if the file contents does not match the extension, you can set the language manually via`--lang` / `-l`. This should work out for following languages:

- `yaml`
- `java`
- `go`
- `c`
- `cpp`
- `javascript`
- `typescript`
- `dockerfile`
- `html`
- `xml`
- `rust`
- `assembly`
- `python`
- more to come ...
| Language | Language | Language | Language | Language |
| -------- | ---------- | -------- | ---------- | ------------------ |
| Assembly | C | C++ | Dart | Dockerfile |
| Elexir | Go | Groovy | Haskell | HTML |
| Java | JavaScript | Julia | Kotlin | Lua |
| Pascal | Perl | PHP | Powershell | Python |
| R | Ruby | Rust | Spice | SQL |
| Swift | TypeScript | XML | YAML | *more to come ...* |

If you did not find your language in the list, you can set the comment identifiers by hand. Here is an example: <br>
`ccom --data ./test-data.json --line-comment-iden "//" --block-comment-iden-open "/*" --block-comment-iden-close "*/" ./test-file.java`
Expand Down
1 change: 0 additions & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ nav:
- install/linux.md
- install/windows.md
- install/source.md
- quick-start.md
- usage.md
- contributing.md

Expand Down

0 comments on commit c98ecc1

Please sign in to comment.