Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

fix(resource/yarn) prevent yarn from building resources managed by npm #175

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions resources/[system]/[builders]/yarn/yarn_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ const yarnBuildTask = {
shouldBuild(resourceName) {
try {
const resourcePath = GetResourcePath(resourceName);

const packageJsonLock = path.resolve(resourcePath, 'package-lock.json');
try {
if (fs.existsSync(packageJsonLock)) {
return false
}
} catch (e) {

}

const packageJson = path.resolve(resourcePath, 'package.json');
const yarnLock = path.resolve(resourcePath, '.yarn.installed');
Expand Down