Skip to content

Commit 997ef0e

Browse files
authored
Initial commit
0 parents  commit 997ef0e

19 files changed

+3399
-0
lines changed

.eslintrc.js

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* eslint-env node */
2+
require("@rushstack/eslint-patch/modern-module-resolution");
3+
4+
module.exports = {
5+
root: true,
6+
env: {
7+
node: true,
8+
amd: true,
9+
},
10+
rules: {
11+
"prettier/prettier": [
12+
"warn",
13+
{
14+
printWidth: 120,
15+
},
16+
],
17+
"max-len": ["warn", { code: 120, ignoreComments: true, ignoreStrings: true }],
18+
"prefer-const": [
19+
"error",
20+
{
21+
destructuring: "all",
22+
ignoreReadBeforeAssign: false,
23+
},
24+
],
25+
"vue/no-unused-vars": [
26+
"warn",
27+
{
28+
ignorePattern: "^_",
29+
},
30+
],
31+
"no-unused-vars": ["warn", { vars: "all", args: "after-used", argsIgnorePattern: "^_" }],
32+
"vue/multi-word-component-names": "off",
33+
},
34+
extends: [
35+
// 这里必须以./开头,否则不会被识别为文件路径
36+
"plugin:vue/vue3-essential",
37+
"eslint:recommended",
38+
],
39+
parserOptions: {
40+
ecmaVersion: "latest",
41+
// parserOptions: { tsconfigRootDir: __dirname }
42+
},
43+
};

.github/workflows/deploy-gh.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and Deploy To gh-pages
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build-and-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout 🛎️
11+
uses: actions/checkout@v3
12+
13+
- name: Setup node env 📦
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version-file: '.nvmrc'
17+
registry-url: https://registry.npmjs.org
18+
check-latest: true
19+
cache: 'npm'
20+
21+
- name: Upgrade npm ✨
22+
run: npm i -g npm@latest
23+
24+
- name: Install dependencies 🚀
25+
run: npm ci --prefer-offline --no-audit --no-optional
26+
27+
- name: Build 🔧
28+
run: npm run build
29+
30+
- name: Deploy to GitHub Pages 🚀
31+
uses: JamesIves/[email protected]
32+
with:
33+
branch: gh-pages
34+
folder: dist

.github/workflows/publish-package.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Node.js Package to Github and NPM
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths: 'package.json'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
- run: npm ci
18+
- run: npm test
19+
20+
publish-npm:
21+
needs: build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: 16
28+
registry-url: https://registry.npmjs.org/
29+
- run: npm ci
30+
- run: npm publish --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
33+
34+
publish-gpr:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
permissions:
38+
packages: write
39+
contents: read
40+
steps:
41+
- uses: actions/checkout@v3
42+
- uses: actions/setup-node@v3
43+
with:
44+
node-version: 16
45+
registry-url: https://npm.pkg.github.com/
46+
- run: npm ci
47+
- run: npm publish
48+
env:
49+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
logs
2+
*.log
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
lerna-debug.log*
8+
9+
node_modules
10+
dist-ssr
11+
*.local
12+
13+
# Editor directories and files
14+
.vscode/*
15+
!.vscode/extensions.json
16+
.idea
17+
.DS_Store
18+
*.suo
19+
*.ntvs*
20+
*.njsproj
21+
*.sln
22+
*.sw?

.npmignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
public
2+
logs
3+
node_modules
4+
public
5+
tmp
6+
dist
7+
nginx.conf
8+
.vscode
9+
.github
10+
.npmrc
11+
index.html
12+
vite.config.js
13+
yarn.lock
14+
src/*
15+
!src/lua2js.mjs

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.17.1

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["Vue.volar"]
3+
}

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# lua2js
2+
[lua2js](https://xiangnanscu.github.io/lua2js/)
3+
transform lua to js literally.

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>lua2js</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.js"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)