Scalable and flexible ts-node utility to manage different application configurations to simplify the main build process.
✓ Typescript on server-side (ts-node
).
✓ It doesn't depend on webpack, grunt, gulp and other tools, but allows to run them inside itself.
✓ Simplifies build process for dev\prod environments.
✓ Works with different project types: Angular2, React, Angular.js, Native JavaScript etc.
✓ Extensible internal plugins, which may be used together or separately.
First parameter is mode, the second one - environment type.
Mode: -def
, -light
, -full
.
Environment: -dev
, -prod
.
Note: to run default sequence plugins with predefined options use a special flag -def
.
- execute default plugins list (defined in plugins.ts).
- execute a light-version with limited plugins number.
- execute all existing plugins list and specify
production
environment type to generate an appropriate application settings.
- all plugins list but apply an internal behaviour for
development
environment.
typings install
.npm install
.
Info: be sure, that you have installed typescript & ts-node globally. If not, put hte followings commands in terminal:
npm install typescript@next -g
.npm install ts-node -g
.
Plugin
Each functional entity in this module is a "Plugin". It's a simple typescript class, which extends BasePlugin class & implements IPlugin interface.
The main purpose - receive arguments list and execute an appropriate behaviour after.
All plugins included into the plugins
directory and injected into the index.ts file there (to simplify handling their behaviour in the future).
Each plugin should return true
if it is valid.
Helpers
Special static classes which allow to use common methods to manage lists, messages, accomplish repeated logic and change self behaviour.
Initializer
An entry file which receives arguments list from CLI inside node.js script.
Note: you may just call ts-node initializer %mode% %env%
.ts file to get the same results above.
MIT License
Copyright (c) 2016 asduser