mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
builders: fix webpack and improve yarn
This commit is contained in:
@@ -12,7 +12,7 @@ const yarnBuildTask = {
|
||||
const resourcePath = GetResourcePath(resourceName);
|
||||
|
||||
const packageJson = path.resolve(resourcePath, 'package.json');
|
||||
const yarnLock = path.resolve(resourcePath, 'yarn.lock');
|
||||
const yarnLock = path.resolve(resourcePath, '.yarn.installed');
|
||||
|
||||
const packageStat = fs.statSync(packageJson);
|
||||
|
||||
@@ -23,7 +23,7 @@ const yarnBuildTask = {
|
||||
return true;
|
||||
}
|
||||
} catch (e) {
|
||||
// no yarn.lock, but package.json - install time!
|
||||
// no yarn.installed, but package.json - install time!
|
||||
return true;
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -57,13 +57,8 @@ const yarnBuildTask = {
|
||||
}
|
||||
|
||||
const resourcePath = GetResourcePath(resourceName);
|
||||
const yarnLock = path.resolve(resourcePath, 'yarn.lock');
|
||||
|
||||
try {
|
||||
fs.utimesSync(yarnLock, new Date(), new Date());
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
const yarnLock = path.resolve(resourcePath, '.yarn.installed');
|
||||
fs.writeFileSync(yarnLock, '');
|
||||
|
||||
buildingInProgress = false;
|
||||
currentBuildingModule = '';
|
||||
|
||||
Reference in New Issue
Block a user