mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 08:26:19 +02:00
pas2js: electron: using npm start
This commit is contained in:
parent
4b48897310
commit
b1d7c82e8b
@ -1256,7 +1256,10 @@ begin
|
|||||||
Src.Add(' "description": "Hello World!",');
|
Src.Add(' "description": "Hello World!",');
|
||||||
Src.Add(' "main": "'+FileToWebFile(ScriptFilename)+'",');
|
Src.Add(' "main": "'+FileToWebFile(ScriptFilename)+'",');
|
||||||
Src.Add(' "author": "Lazarus - www.lazarus-ide.org",');
|
Src.Add(' "author": "Lazarus - www.lazarus-ide.org",');
|
||||||
Src.Add(' "license": "LGPL2"');
|
Src.Add(' "license": "LGPL2",');
|
||||||
|
Src.Add(' "scripts": {');
|
||||||
|
Src.Add(' "start": "electron ."');
|
||||||
|
Src.Add(' }');
|
||||||
Src.Add('}');
|
Src.Add('}');
|
||||||
aFile.SetSourceText(Src.Text,false);
|
aFile.SetSourceText(Src.Text,false);
|
||||||
finally
|
finally
|
||||||
@ -1323,7 +1326,7 @@ begin
|
|||||||
// all three projects can run the electron app
|
// all three projects can run the electron app
|
||||||
RunMode:=AProject.RunParameters.GetOrCreate('default');
|
RunMode:=AProject.RunParameters.GetOrCreate('default');
|
||||||
RunMode.UseLaunchingApplication:=true;
|
RunMode.UseLaunchingApplication:=true;
|
||||||
RunMode.LaunchingApplicationPathPlusParams:='"$(Pas2JSElectron)" .';
|
RunMode.LaunchingApplicationPathPlusParams:='npm start';
|
||||||
|
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user