Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Add possibility of having project files in different locations than root, when packaging webos project #115

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/react-tv-cli/scripts/webos/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function run(root, device) {
fs.removeSync(`${webosPath}/icon.png`);
fs.removeSync(`${webosPath}/icon-large.png`);
ReactTVConfig.files.forEach(file => {
fs.removeSync(`${webosPath}/${file}`);
fs.removeSync(`${webosPath}/${path.basename(file)}`);
});
}

Expand All @@ -88,10 +88,11 @@ function run(root, device) {

ReactTVConfig.files.forEach(file => {
const filePath = path.resolve(root, file);
const toFile = path.resolve(webosPath, file);
const toFile = path.resolve(webosPath, path.basename(file) );
fs.ensureDirSync(path.dirname(toFile));
fs.copySync(`${filePath}`, `${toFile}`);
});

} catch (e) {
return console.log('FAIL TO MOUNT', e.toString());
}
Expand Down