Extend System Runtime
Există multe modalităţi de a adăuga noi funcţionalităţi pe System Runtime. Pentru a face astfel încât să puteţi:
- actualizaţi codul sursă,
- adaugă addons sau
- adaugă extensii.
Update System Runtime source code
Instalare
To update System Runtime, you will need to clone the repository:
git clone https://github.com/design-first/system-runtime.git
Once you have cloned the repository, install the dependencies:
npm i
Mod dezvoltare
Începe System Runtime în modul de dezvoltare:
npm run dev
All the modifications to the source code of System Runtime will build System Runtime core module.
Actualizează codul sursă
System Runtime has got a customizable core system. You can update all its components, models or behaviors to follow your needs. To do so:
- open a version of System Designer,
- import System Runtime core system on the /src/system directory,
- edit the system,
- export it,
- save it in the same place.
Because you have changed the source code, System Runtime will be automatically rebuild in development mode.
Build
Once you have finished all your modification, you can build System Runtime:
npm run build
O să:
- build System Runtime core module for the server library and
- build System Runtime client library on the /dist directory
Adaugă programe de completare
You can also update System Runtime core system by composing other systems with it. In that case, other systems are called addons.
To compose a system with System Runtime core systems, just copy and paste a system into the /src/addons directory and build System Runtime.
Adaugă extensii
You can extend System Runtime core system by composing other systems at runtime. In that case, these systems are called extensions.
To add an extension, just install it at runtime.
Install an extension client-side
Trebuie doar să adăugaţi un tag link în codul HTML pentru a instala și a porni extensia:
<!-- install your extension -->
<link rel="system" type="application/json" href="storage.json">
Instalaţi o extensie server-side
Doar apelați la install API pentru a instala și porni extensia:
// pentru ați instala extensiile
runtime.install('storage.json');
Conclusion
Noi am văzut în articolul acesta:
- how to build System Runtime,
- how to update System Runtime source code,
- how to add addons and
- how to add extensions.
In ultimul articol, vom merge mai adânc în folosul System Runtime.