mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-07-30 08:02:00 +08:00
Added github workflow for building dist files
This commit is contained in:
parent
05b03b5337
commit
94262e162a
29
.github/workflows/main.yml
vendored
Normal file
29
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: update
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: 'master'
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14"
|
||||
- name: Install dependencies
|
||||
run: cd backend && npm i
|
||||
- name: Build
|
||||
run: cd backend && npm run build
|
||||
- name: Commit changes
|
||||
if: contains(github.event.head_commit.message, '#build')
|
||||
run: |
|
||||
git config user.email github-actions
|
||||
git config user.name github-actions@github.com
|
||||
git add .
|
||||
git commit -m "Release" -a
|
||||
git push
|
2
backend/dist/sub-store-parser.loon.min.js
vendored
2
backend/dist/sub-store-parser.loon.min.js
vendored
@ -6,7 +6,7 @@
|
||||
* ███████║╚██████╔╝██████╔╝ ███████║ ██║ ╚██████╔╝██║ ██║███████╗
|
||||
* ╚══════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
|
||||
* Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket!
|
||||
* @updated: 2022/6/21 09:20:44
|
||||
* @updated: 2022/6/21 04:41:29
|
||||
* @version: 2.1.2
|
||||
* @author: Peng-YM
|
||||
* @github: https://github.com/Peng-YM/Sub-Store
|
||||
|
@ -15,7 +15,16 @@ export function peggy() {
|
||||
.pipe(tap(function (file) {
|
||||
const filename = path.basename(file.path).split(".")[0] + ".js";
|
||||
const raw = fs.readFileSync(file.path, 'utf8');
|
||||
const contents = `import * as peggy from 'peggy';\nconst grammars = String.raw\`\n${raw}\n\`;\nlet parser;\nexport default function getParser() { if(!parser) { parser = peggy.generate(grammars); } return parser; }`;
|
||||
const contents =
|
||||
`import * as peggy from 'peggy';
|
||||
const grammars = String.raw\`\n${raw}\n\`;
|
||||
let parser;
|
||||
export default function getParser() {
|
||||
if (!parser) {
|
||||
parser = peggy.generate(grammars);
|
||||
}
|
||||
return parser;
|
||||
}\n`;
|
||||
return newFile(filename, contents)
|
||||
.pipe(gulp.dest(path.dirname(file.path)))
|
||||
}));
|
||||
@ -67,7 +76,7 @@ function scripts(src, dest) {
|
||||
function banner(dest) {
|
||||
return () => gulp
|
||||
.src(dest)
|
||||
.pipe(header(fs.readFileSync('./banner', 'utf-8'), {pkg, updated: new Date().toLocaleString()}))
|
||||
.pipe(header(fs.readFileSync('./banner', 'utf-8'), {pkg, updated: new Date().toLocaleString('zh-CN')}))
|
||||
.pipe(gulp.dest((file) => file.base));
|
||||
}
|
||||
|
||||
|
13630
backend/package-lock.json
generated
13630
backend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
2
backend/sub-store.min.js
vendored
2
backend/sub-store.min.js
vendored
@ -6,7 +6,7 @@
|
||||
* ███████║╚██████╔╝██████╔╝ ███████║ ██║ ╚██████╔╝██║ ██║███████╗
|
||||
* ╚══════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
|
||||
* Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket!
|
||||
* @updated: 2022/6/21 09:20:44
|
||||
* @updated: 2022/6/21 04:41:29
|
||||
* @version: 2.1.2
|
||||
* @author: Peng-YM
|
||||
* @github: https://github.com/Peng-YM/Sub-Store
|
||||
|
Loading…
x
Reference in New Issue
Block a user