Skip to content

Commit d9d0aa4

Browse files
Initial commit
0 parents  commit d9d0aa4

30 files changed

+702
-0
lines changed

.darklua-bundle-dev.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"bundle": {
3+
"require_mode": "path"
4+
},
5+
"process": [
6+
{
7+
"rule": "inject_global_value",
8+
"identifier": "LUA_ENV",
9+
"value": "roblox"
10+
},
11+
{
12+
"rule": "inject_global_value",
13+
"identifier": "__DEV__",
14+
"value": true
15+
},
16+
"remove_types",
17+
"remove_comments",
18+
"remove_spaces",
19+
"compute_expression",
20+
"remove_unused_if_branch",
21+
"remove_unused_while",
22+
"filter_after_early_return",
23+
"remove_nil_declaration",
24+
"remove_empty_do"
25+
]
26+
}

.darklua-bundle.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"bundle": {
3+
"require_mode": "path"
4+
},
5+
"process": [
6+
{
7+
"rule": "inject_global_value",
8+
"identifier": "LUA_ENV",
9+
"value": "roblox"
10+
},
11+
{
12+
"rule": "inject_global_value",
13+
"identifier": "__DEV__",
14+
"value": false
15+
},
16+
"remove_types",
17+
"remove_comments",
18+
"remove_spaces",
19+
"compute_expression",
20+
"remove_unused_if_branch",
21+
"remove_unused_while",
22+
"filter_after_early_return",
23+
"remove_nil_declaration",
24+
"remove_empty_do"
25+
]
26+
}

.darklua-dev.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"process": [
3+
{
4+
"rule": "inject_global_value",
5+
"identifier": "LUA_ENV",
6+
"value": "roblox"
7+
},
8+
{
9+
"rule": "inject_global_value",
10+
"identifier": "__DEV__",
11+
"value": true
12+
},
13+
{
14+
"rule": "convert_require",
15+
"current": "path",
16+
"target": "roblox"
17+
},
18+
"compute_expression",
19+
"remove_unused_if_branch",
20+
"remove_unused_while",
21+
"filter_after_early_return",
22+
"remove_nil_declaration",
23+
"remove_empty_do"
24+
]
25+
}

.darklua.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"process": [
3+
{
4+
"rule": "inject_global_value",
5+
"identifier": "LUA_ENV",
6+
"value": "roblox"
7+
},
8+
{
9+
"rule": "inject_global_value",
10+
"identifier": "__DEV__",
11+
"value": false
12+
},
13+
{
14+
"rule": "convert_require",
15+
"current": "path",
16+
"target": "roblox"
17+
},
18+
"compute_expression",
19+
"remove_unused_if_branch",
20+
"remove_unused_while",
21+
"filter_after_early_return",
22+
"remove_nil_declaration",
23+
"remove_empty_do"
24+
]
25+
}

.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* text eol=lf
2+
3+
*.gif binary
4+
*.ico binary
5+
*.jpg binary
6+
*.png binary

.github/pull_request_template.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Closes #[issue number]
2+
3+
<!-- description of the changes -->
4+
5+
- [ ] add entry to the changelog

.github/workflows/release.yml

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_tag:
7+
description: "The version to release starting with `v`"
8+
required: true
9+
type: string
10+
11+
release_ref:
12+
description: "The branch, tag or SHA to checkout (default to latest)"
13+
default: ""
14+
type: string
15+
16+
permissions:
17+
contents: write
18+
19+
jobs:
20+
publish-package:
21+
name: Publish package
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: "latest"
30+
cache: "yarn"
31+
cache-dependency-path: "yarn.lock"
32+
33+
- name: Install packages
34+
run: yarn install --frozen-lockfile
35+
36+
- run: yarn publish
37+
env:
38+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
40+
create-release:
41+
needs: publish-package
42+
43+
name: Create release
44+
runs-on: ubuntu-latest
45+
46+
outputs:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
52+
- name: Create tag
53+
run: |
54+
git fetch --tags --no-recurse-submodules
55+
if [ ! $(git tag -l ${{ inputs.release_tag }}) ]; then
56+
git tag ${{ inputs.release_tag }}
57+
git push origin ${{ inputs.release_tag }}
58+
fi
59+
60+
- name: Create release
61+
id: create_release
62+
uses: softprops/action-gh-release@v1
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
with:
66+
tag_name: ${{ inputs.release_tag }}
67+
name: ${{ inputs.release_tag }}
68+
draft: false
69+
70+
build-assets:
71+
needs: create-release
72+
73+
name: Add assets
74+
runs-on: ubuntu-latest
75+
76+
strategy:
77+
fail-fast: false
78+
matrix:
79+
include:
80+
- artifact-name: signal.rbxm
81+
path: build/signal.rbxm
82+
asset-type: application/octet-stream
83+
84+
- artifact-name: signal-dev.rbxm
85+
path: build/debug/signal.rbxm
86+
asset-type: application/octet-stream
87+
88+
- artifact-name: signal-roblox-bundled.lua
89+
path: build/signal.lua
90+
asset-type: text/plain
91+
92+
- artifact-name: signal-roblox-bundled-dev.lua
93+
path: build/debug/signal.lua
94+
asset-type: text/plain
95+
96+
steps:
97+
- uses: actions/checkout@v4
98+
99+
- uses: Roblox/setup-foreman@v1
100+
with:
101+
token: ${{ secrets.GITHUB_TOKEN }}
102+
103+
- uses: actions/setup-node@v3
104+
with:
105+
node-version: "latest"
106+
cache: "yarn"
107+
cache-dependency-path: "yarn.lock"
108+
109+
- name: Install packages
110+
run: yarn install --frozen-lockfile
111+
112+
- name: Build assets
113+
run: yarn run build
114+
115+
- name: Upload asset
116+
uses: actions/upload-artifact@v3
117+
with:
118+
name: ${{ matrix.artifact-name }}
119+
path: ${{ matrix.path }}
120+
121+
- name: Add asset to Release
122+
uses: actions/upload-release-asset@v1
123+
env:
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125+
with:
126+
upload_url: ${{ needs.create-release.outputs.upload_url }}
127+
asset_path: ${{ matrix.path }}
128+
asset_name: ${{ matrix.artifact-name }}
129+
asset_content_type: ${{ matrix.asset-type }}

.github/workflows/test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Run tests
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: Roblox/setup-foreman@v1
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: "latest"
26+
cache: "yarn"
27+
cache-dependency-path: "yarn.lock"
28+
29+
- name: Install packages
30+
run: yarn install --frozen-lockfile
31+
32+
- name: Run linter
33+
run: yarn run lint
34+
35+
- name: Verify code style
36+
run: yarn run style-check
37+
38+
- name: Build assets
39+
run: yarn run build

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/site
2+
/*.rbxl
3+
/*.rbxlx
4+
/*.rbxl.lock
5+
/*.rbxlx.lock
6+
/*.rbxm
7+
/*.rbxmx
8+
9+
/node_modules
10+
/roblox
11+
/build
12+
13+
/globalTypes.d.lua
14+
15+
**/sourcemap.json

.luau-analyze.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"luau-lsp.require.mode": "relativeToFile",
3+
"luau-lsp.require.directoryAliases": {
4+
"@pkg": "node_modules/.luau-aliases"
5+
}
6+
}

.luaurc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"languageMode": "strict",
3+
"lintErrors": true,
4+
"lint": {
5+
"*": true,
6+
"LocalShadow": false
7+
}
8+
}

.npmignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/.github/
2+
/.vscode/
3+
/scripts/
4+
5+
/roblox
6+
/build
7+
8+
.gitattributes
9+
CHANGELOG.md
10+
11+
.darklua*
12+
.luau-analyze.json
13+
.luaurc
14+
foreman.toml
15+
selene.toml
16+
selene_definitions.yml
17+
stylua.toml
18+
.styluaignore
19+
20+
/globalTypes.d.lua
21+
**/sourcemap.json
22+
**/*.project.json
23+
24+
**/__tests__
25+
**/*.test.lua
26+
**/jest.config.lua
27+
28+
**/*.rbxl
29+
**/*.rbxlx
30+
**/*.rbxl.lock
31+
**/*.rbxlx.lock
32+
**/*.rbxm
33+
**/*.rbxmx
34+

.styluaignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/node_modules
2+
/build
3+
/roblox
4+
5+
**/*.d.lua

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"luau-lsp.require.directoryAliases": {
3+
"@pkg": "node_modules/.luau-aliases"
4+
}
5+
}

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 0.1.0
4+
5+
* Initial version

0 commit comments

Comments
 (0)