From 2a4e172cf8b39504535778b7bb978ba4babafd65 Mon Sep 17 00:00:00 2001 From: ljacobsson Date: Wed, 4 Oct 2023 15:48:56 +0200 Subject: [PATCH] Fix for missing files in sam+ts 'samp local' --- package.json | 2 +- src/commands/local/local.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d864c81..f295b20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samp-cli", - "version": "1.0.59", + "version": "1.0.60", "description": "CLI tool for extended productivity with AWS Serverless Application Model (SAM)", "main": "index.js", "scripts": { diff --git a/src/commands/local/local.js b/src/commands/local/local.js index 4fc817e..ed8ce26 100644 --- a/src/commands/local/local.js +++ b/src/commands/local/local.js @@ -102,6 +102,8 @@ function setupSAM_TS(initialised) { // remove // comments fileContent = fileContent.replace(/\/\/.*/g, ''); const tscProcess = exec(`${__dirname}/../../../node_modules/.bin/tsc-watch --module commonjs --sourceMap true --outDir ${process.env.outDir} --noEmit false`, {}); + copyFiles(process.cwd(), `${process.cwd()}/.samp-out`); + tscProcess.stdout.on('data', (data) => { console.log("tsc: ", data.toString().replace(/\n$/, '')); if (data.toString().includes("Watching for file changes") && !initialised) {