Skip to content

Commit 297c6dd

Browse files
committed
first commit
0 parents  commit 297c6dd

232 files changed

Lines changed: 21871 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets).
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"words": ["customplace", "endrod", "pottable", "shearable", "sittable", "Toggleable", "unsheared", "unwaxing"]
3+
}

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint
2+
description: Lint and build the project to check for errors.
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
cache: npm
18+
19+
- name: Install modules
20+
run: npm ci
21+
22+
- name: Run ESLint in all workspaces
23+
run: npm run lint --workspaces

.github/workflows/npm-publish.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Publish Packages
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
permissions:
9+
id-token: write
10+
contents: write
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: npm
26+
registry-url: https://registry.npmjs.org
27+
28+
- name: Update npm
29+
run: npm install -g npm@latest
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Parse release tag
35+
id: tag
36+
run: |
37+
TAG="${{ github.event.release.tag_name }}"
38+
NAME="${TAG%%_v*}"
39+
VERSION="${TAG##*_v}"
40+
41+
echo "name=$NAME" >> $GITHUB_OUTPUT
42+
echo "version=$VERSION" >> $GITHUB_OUTPUT
43+
44+
- name: Publish packages
45+
run: npx changeset publish
46+
47+
- name: Build package
48+
run: |
49+
PKG=${{ steps.tag.outputs.name }}
50+
npm run build --workspace="$PKG"
51+
52+
- name: Archive package
53+
run: |
54+
mkdir artifacts
55+
56+
PKG_FULL=${{ steps.tag.outputs.name }}
57+
VERSION=${{ steps.tag.outputs.version}}
58+
59+
PKG_NAME="${PKG_FULL#@*/}"
60+
61+
tar -czf "artifacts/${PKG_NAME}_v${VERSION}.tar.gz" \
62+
-C "libraries/$PKG_NAME" .
63+
64+
- name: Upload release asset
65+
uses: softprops/action-gh-release@v2
66+
with:
67+
files: artifacts/*.tar.gz

.github/workflows/tests.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
cache: npm
18+
19+
- name: Install modules
20+
run: npm ci
21+
22+
- name: Run tests in all workspaces
23+
run: npm run test --workspaces

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
*.lnk

.prettierrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"printWidth": 120
3+
}

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contributing
2+
3+
This project welcomes contributions and suggestions!
4+
5+
## Coding Style
6+
7+
- Use ESLint to lint.
8+
- Use Prettier to style.
9+
10+
## Publishing Packages
11+
12+
This monorepo uses [Changesets](https://github.com/changesets/changesets) to manage package versions and publishing.
13+
14+
- When making changes to a package under `libraries/*`, create a changeset to track the update:
15+
16+
```sh
17+
npx changeset
18+
```
19+
20+
- This ensures the version is bumped and only changed packages are published.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# @lpsmods/minecraft-scripting-libraries
2+
3+
A collection of packages to help create Minecraft Bedrock add-ons!
4+
5+
## Packages
6+
7+
- @lpsmods/mc-common
8+
- @lpsmods/mc-dev
9+
- @lpsmods/mc-mixins
10+
- @lpsmods/mc-superstruct
11+
- @lpsmods/mc-utils
12+
- @lpsmods/mcaddon-bridge

0 commit comments

Comments
 (0)