diff --git a/packages/nodejs/namespaced/NodeApi.FS.pas b/packages/nodejs/namespaced/NodeApi.FS.pas new file mode 100644 index 0000000..f47caba --- /dev/null +++ b/packages/nodejs/namespaced/NodeApi.FS.pas @@ -0,0 +1,3 @@ +{$DEFINE FPC_DOTTEDUNITS} +unit NodeApi.FS; +{$include ../src/node.fs.pas} diff --git a/packages/nodejs/namespaced/NodeApi.Http.pas b/packages/nodejs/namespaced/NodeApi.Http.pas new file mode 100644 index 0000000..9dedeeb --- /dev/null +++ b/packages/nodejs/namespaced/NodeApi.Http.pas @@ -0,0 +1,3 @@ +{$DEFINE FPC_DOTTEDUNITS} +unit NodeApi.Http; +{$include ../src/node.http.pas} diff --git a/packages/nodejs/namespaced/NodeApi.Net.pas b/packages/nodejs/namespaced/NodeApi.Net.pas new file mode 100644 index 0000000..a8ae9b4 --- /dev/null +++ b/packages/nodejs/namespaced/NodeApi.Net.pas @@ -0,0 +1,3 @@ +{$DEFINE FPC_DOTTEDUNITS} +unit NodeApi.Net; +{$include ../src/node.net.pas} diff --git a/packages/nodejs/namespaced/NodeApi.OnOff.pas b/packages/nodejs/namespaced/NodeApi.OnOff.pas new file mode 100644 index 0000000..5b3b745 --- /dev/null +++ b/packages/nodejs/namespaced/NodeApi.OnOff.pas @@ -0,0 +1,3 @@ +{$DEFINE FPC_DOTTEDUNITS} +unit NodeApi.OnOff; +{$include ../src/node.onoff.pas} diff --git a/packages/nodejs/namespaced/NodeApi.SPIDevice.pas b/packages/nodejs/namespaced/NodeApi.SPIDevice.pas new file mode 100644 index 0000000..f0ca927 --- /dev/null +++ b/packages/nodejs/namespaced/NodeApi.SPIDevice.pas @@ -0,0 +1,3 @@ +{$DEFINE FPC_DOTTEDUNITS} +unit NodeApi.SPIDevice; +{$include ../src/node.spidevice.pas} diff --git a/packages/nodejs/namespaced/NodeApi.Url.pas b/packages/nodejs/namespaced/NodeApi.Url.pas new file mode 100644 index 0000000..42e00e3 --- /dev/null +++ b/packages/nodejs/namespaced/NodeApi.Url.pas @@ -0,0 +1,3 @@ +{$DEFINE FPC_DOTTEDUNITS} +unit NodeApi.Url; +{$include ../src/node.url.pas} diff --git a/packages/nodejs/node.fs.pas b/packages/nodejs/src/node.fs.pas similarity index 99% rename from packages/nodejs/node.fs.pas rename to packages/nodejs/src/node.fs.pas index 4fd1d86..efe70b3 100644 --- a/packages/nodejs/node.fs.pas +++ b/packages/nodejs/src/node.fs.pas @@ -10,7 +10,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} +{$IFNDEF FPC_DOTTEDUNITS} unit node.fs; +{$ENDIF} {$mode objfpc} {$ModeSwitch externalclass} @@ -18,7 +20,11 @@ unit node.fs; interface uses +{$IFDEF FPC_DOTTEDUNITS} + JSApi.JS,NodeApi.JS, System.Types, System.SysUtils; +{$ELSE} JS, NodeJS, Types, SysUtils; +{$ENDIF} var DirectorySeparator: char = '/'; diff --git a/packages/nodejs/node.http.pas b/packages/nodejs/src/node.http.pas similarity index 98% rename from packages/nodejs/node.http.pas rename to packages/nodejs/src/node.http.pas index 19f7525..298d448 100644 --- a/packages/nodejs/node.http.pas +++ b/packages/nodejs/src/node.http.pas @@ -12,7 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} +{$IFNDEF FPC_DOTTEDUNITS} unit node.http; +{$ENDIF} {$mode objfpc} {$modeswitch externalclass} @@ -20,7 +22,11 @@ unit node.http; interface uses +{$IFDEF FPC_DOTTEDUNITS} + System.Types, JSApi.JS,NodeApi.JS, NodeApi.Net; +{$ELSE} js, nodejs, types, node.net; +{$ENDIF} Type { TNJSHTTPIncomingMessage } diff --git a/packages/nodejs/node.net.pas b/packages/nodejs/src/node.net.pas similarity index 95% rename from packages/nodejs/node.net.pas rename to packages/nodejs/src/node.net.pas index 16ca938..804487f 100644 --- a/packages/nodejs/node.net.pas +++ b/packages/nodejs/src/node.net.pas @@ -12,7 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} +{$IFNDEF FPC_DOTTEDUNITS} unit node.net; +{$ENDIF} {$mode objfpc} {$modeswitch externalclass} @@ -20,7 +22,11 @@ unit node.net; interface uses +{$IFDEF FPC_DOTTEDUNITS} + System.Classes, System.SysUtils, JSApi.JS, NodeApi.JS; +{$ELSE} Classes, SysUtils, js, nodejs; +{$ENDIF} type TNJSStreamDuplex = class external name 'stream.Duplex' (TJSObject); diff --git a/packages/nodejs/node.onoff.pas b/packages/nodejs/src/node.onoff.pas similarity index 95% rename from packages/nodejs/node.onoff.pas rename to packages/nodejs/src/node.onoff.pas index 2253d8b..9aac5a8 100644 --- a/packages/nodejs/node.onoff.pas +++ b/packages/nodejs/src/node.onoff.pas @@ -12,8 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} - +{$IFNDEF FPC_DOTTEDUNITS} unit node.onoff; +{$ENDIF} {$mode objfpc} {$modeswitch externalclass} @@ -21,7 +22,11 @@ unit node.onoff; interface uses +{$IFDEF FPC_DOTTEDUNITS} + JSApi.JS, NodeApi.JS; +{$ELSE} JS,nodejs; +{$ENDIF} Type TGPIOReadCallBack = reference to procedure(err : TJSError; aValue : Byte); diff --git a/packages/nodejs/node.spidevice.pas b/packages/nodejs/src/node.spidevice.pas similarity index 97% rename from packages/nodejs/node.spidevice.pas rename to packages/nodejs/src/node.spidevice.pas index 359f77f..63ebea3 100644 --- a/packages/nodejs/node.spidevice.pas +++ b/packages/nodejs/src/node.spidevice.pas @@ -12,7 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} +{$IFNDEF FPC_DOTTEDUNITS} unit node.spidevice; +{$ENDIF} {$mode objfpc} {$modeswitch externalclass} @@ -20,7 +22,11 @@ unit node.spidevice; interface uses +{$IFDEF FPC_DOTTEDUNITS} + JSApi.JS, NodeApi.JS; +{$ELSE} JS,NodeJS; +{$ENDIF} Type diff --git a/packages/nodejs/node.url.pas b/packages/nodejs/src/node.url.pas similarity index 95% rename from packages/nodejs/node.url.pas rename to packages/nodejs/src/node.url.pas index 93d32b6..c78f385 100644 --- a/packages/nodejs/node.url.pas +++ b/packages/nodejs/src/node.url.pas @@ -12,8 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} - +{$IFNDEF FPC_DOTTEDUNITS} unit node.url; +{$ENDIF} {$mode objfpc} {$ModeSwitch externalclass} @@ -21,7 +22,11 @@ unit node.url; interface uses +{$IFDEF FPC_DOTTEDUNITS} + System.Types, JSApi.JS, NodeApi.JS; +{$ELSE} Types, JS, nodeJS; +{$ENDIF} Type TNJSURLSearchParams = Class external name 'URLSearchParams' (TJSObject)