Skip to content

Commit

Permalink
Merge branch 'release/13.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Apr 4, 2024
2 parents cb1ae43 + dba8e64 commit 9e768b2
Show file tree
Hide file tree
Showing 40 changed files with 2,792 additions and 2,864 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ npm-debug.log.*
# Visual Studio Code
/.vscode
/.vs
!/.vscode/launch.json

# JetBrains
/.idea
Expand All @@ -17,6 +18,7 @@ npm-debug.log.*

# Temp
/temp
/*.cpuprofile

# Launcher files (created during testing)
/config.json
Expand Down
20 changes: 0 additions & 20 deletions .swcrc

This file was deleted.

38 changes: 38 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Electron: Main",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"autoAttachChildProcesses": true,
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"args" : [
"--remote-debugging-port=9223",
"."
],
"outputCapture": "std"
},
{
"name": "Electron: Renderer",
"type": "chrome",
"request": "attach",
"port": 9223,
"webRoot": "${workspaceFolder}",
"timeout": 30000
}
],
"compounds": [
{
"name": "Electron: All",
"configurations": [
"Electron: Main",
"Electron: Renderer"
]
}
]
}
2 changes: 1 addition & 1 deletion extensions/core-curation
41 changes: 32 additions & 9 deletions extensions/core-ruffle/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const fs = require('fs');
const gulp = require('gulp');
const zip = require('gulp-zip');
const merge = require('merge-stream');
const esbuild = require('esbuild');

const filesToCopy = [
'extension.js',
Expand All @@ -12,6 +13,29 @@ const filesToCopy = [
'README.md'
];

function build(done) {
esbuild.build({
bundle: true,
entryPoints: ['./src/extension.ts'],
outfile: './dist/extension.js',
platform: 'node',
external: ['flashpoint-launcher'],
})
.catch(console.error)
.finally(done);
}

async function watch() {
const ctx = await esbuild.context({
bundle: true,
entryPoints: ['./src/extension.ts'],
outfile: './dist/extension.js',
platform: 'node',
external: ['flashpoint-launcher'],
});
return ctx.watch();
}

function clean(cb) {
fs.rm('./package', { recursive: true }, (err) => {
if (err) { console.log('Clean', err); }
Expand All @@ -22,22 +46,21 @@ function clean(cb) {
function stage() {
const streams = filesToCopy.map(file => {
if (fs.existsSync(file)) {
return gulp.src(file).pipe(gulp.dest('package/core-curation'));
return gulp.src(file).pipe(gulp.dest('package/core-ruffle'));
}
}).filter(s => s !== undefined);
return merge([
...streams,
gulp.src('out/**/*').pipe(gulp.dest('package/core-curation/out')),
gulp.src('dist/**/*').pipe(gulp.dest('package/core-curation/dist')),
gulp.src('static/**/*').pipe(gulp.dest('package/core-curation/static')),
gulp.src('out/**/*').pipe(gulp.dest('package/core-ruffle/out')),
gulp.src('dist/**/*').pipe(gulp.dest('package/core-ruffle/dist')),
gulp.src('static/**/*').pipe(gulp.dest('package/core-ruffle/static')),
]);
}

function package() {
return gulp.src('package/**/*').pipe(zip('core-curation.fplx')).pipe(gulp.dest('.'));
return gulp.src('package/**/*').pipe(zip('core-ruffle.fplx')).pipe(gulp.dest('.'));
}

exports.clean = clean;
exports.stage = stage;
exports.package = package;
exports.default = series(clean, stage, package);
exports.build = series(build);
exports.watch = series(watch);
exports.package = series(clean, stage, package);
Loading

0 comments on commit 9e768b2

Please sign in to comment.