Typedef
Static Public Summary | ||
public |
|
|
public |
|
|
public |
BuildEngineGetCommand(target: Target, buildType: string, forceRun: boolean, forceWatch: boolean, forceInspect: boolean): string: function |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
TargetConfigurationCreator(overwritePath: string, baseConfiguration: ConfigurationFile): ConfigurationFile: function |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
TargetFileRuleHandler(target: Target, hasTarget: boolean, currentRule: TargetFileRuleSettings): function |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
UpdateEnvPresetFunction(options: Object): Object: function |
Static Public
public BrowserTarget: Object source
Properties:
Name | Type | Attribute | Description |
engine | string | This will tell projext which build engine you are going to bundle the target code with. |
|
hasFolder | boolean | Whether your target code is on a sub folder of the source directory ( |
|
createFolder | boolean | Whether or not to create a folder for your targets code on the distribution directory when the target is bundled/copied. |
|
folder | string | If either |
|
entry | ProjectConfigurationTargetTemplateEntry | The target entry files for each specific build type. |
|
output | ProjectConfigurationTargetTemplateOutput | The target output settings for each specific build type. |
|
originalOutput | ProjectConfigurationTargetTemplateOutput | The target output settings for each specific build type, without the placeholders replaced. |
|
sourceMap | ProjectConfigurationTargetTemplateSourceMapSettings | The target source map settings for each specific environment build. |
|
html | ProjectConfigurationBrowserTargetTemplateHTMLSettings | In the case the target is an app, these are the options for the |
|
css | ProjectConfigurationBrowserTargetTemplateCSSSettings | These options help you customize the way the bundling process handles your CSS code. |
|
includeModules | Array | This setting can be used to specify a list of node modules you want to process on your bundle. This means that JS files from modules on this list will be transpiled. |
|
includeTargets | Array | This setting can be used to specify a list of other targets you want to process on your bundle. This means that JS and SCSS files from these targets will be transpiled/processed. |
|
uglifyOnProduction | boolean | When a bundle is created, this setting will tell the build engine whether to uglify the code for production or not. |
|
runOnDevelopment | boolean | This will tell the build engine that when you build the target for a development environment,
it should bring up an |
|
watch | ProjectConfigurationTargetWatchOptions | The settings for the projext watch mode, which watches the target files for changes and updates the build without executing it. |
|
babel | ProjectConfigurationBrowserTargetTemplateBabelSettings | These options are used by the build engine to configure Babel: |
|
flow | boolean | Whether or not your target uses flow. This will update the Babel configuration in order to add support for it. |
|
typeScript | boolean | Whether or not your target uses TypeScript. This will update the Babel configuration in order to add support for it. |
|
library | boolean | This will tell the build engine that it needs to be builded as a library to be |
|
libraryOptions | ProjectConfigurationBrowserTargetTemplateLibraryOptions | In case |
|
cleanBeforeBuild | boolean | Whether or not to remove all code from previous builds from the distribution directory when making a new build. |
|
copy | Array | A list of files to copy during the bundling process. It can be a list of file paths relative to the target source directory, in which case they'll be copied to the target distribution directory root; or a list of ProjectConfigurationTargetTemplateCopyItem. |
|
dotEnv | ProjectConfigurationTargetTemplateDotEnvSettings | These options are used by both projext and the build engine in order to load "environment files". |
|
devServer | ProjectConfigurationBrowserTargetTemplateDevServerSettings | These are the options for the |
|
configuration | ProjectConfigurationBrowserTargetTemplateConfigurationSettings | These are the settings for the feature that allows a browser target to have a dynamic configuration file. |
|
is | TargetTypeCheck | To check whether the target type is |
|
paths | TargetPaths | The target absolute paths to both the source directory folder and the distribution directory folder. |
|
folders | TargetFolders | The target relative paths to both the source directory folder and the distribution directory folder. |
public BuildEngine: Object source
Properties:
Name | Type | Attribute | Description |
getBuildCommand | BuildEngineGetCommand | The method used by projext in order to get the shell comands to build and/or run a target. |
public BuildEngineGetCommand(target: Target, buildType: string, forceRun: boolean, forceWatch: boolean, forceInspect: boolean): string: function source
Params:
Name | Type | Attribute | Description |
target | Target | The target information. |
|
buildType | string | The intended build type: |
|
forceRun | boolean |
|
Force the target to run even if the |
forceWatch | boolean |
|
Force the build engine to watch the target files even if the |
forceInspect | boolean |
|
Force the build engine to use the Node inspector even if the target setting is disabled. This only applies for Node targets. |
public CLIBuildCommandParams: Object source
Properties:
Name | Type | Attribute | Description |
target | Target | The target information. |
|
type | string | The intended build type: |
|
run | boolean | Whether or not the target needs to be executed. |
|
build | boolean | Whether or not a build will be created. This is always |
|
watch | boolean | Whether or not the target files will be watched. |
|
inspect | boolean | Whether or not to enable the Node inspector. |
public NodeInspectorSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean | Whether or not to enable the Node inspector. |
|
host | string | The host where the Node inspector will run. |
|
port | number | The port where the Node inspector will run. |
|
command | string | The Node inspector flag command ( |
|
ndb | boolean | Whether or not to use Google's ndb instead of the native inspector. The way it will be used will be by calling the executable without path, so it's up to the project to install it (global or local). |
public NodeTarget: Object source
Properties:
Name | Type | Attribute | Description |
bundle | boolean | Whether or not the target needs to be bundled.
If the value is |
|
transpile | boolean | This option is kind of tied to the previous one: You may not want to bundle your Node target, but you can transpile it with Babel if you want to use a feature not yet supported by the runtime. |
|
engine | string | In case |
|
hasFolder | boolean | Whether your target code is on a sub folder of the source directory ( |
|
createFolder | boolean | Whether or not to create a folder for your targets code on the distribution directory when the target is bundled/copied. |
|
folder | string | If either |
|
entry | ProjectConfigurationTargetTemplateEntry | The target entry files for each specific build type. |
|
output | ProjectConfigurationTargetTemplateOutput | The target output settings for each specific build type. |
|
originalOutput | ProjectConfigurationTargetTemplateOutput | The target output settings for each specific build type, without the placeholders replaced. |
|
sourceMap | ProjectConfigurationTargetTemplateSourceMapSettings | The target source map settings for each specific environment build. |
|
inspect | ProjectConfigurationNodeTargetInspectSettings | The target settings for the Node inspector. |
|
css | ProjectConfigurationNodeTargetTemplateCSSSettings | These options help you customize the way the bundling process handles your CSS code. |
|
includeModules | Array | This setting can be used to specify a list of node modules you want to process on your bundle. This means that JS files from modules on this list will be transpiled. |
|
excludeModules | Array | This setting can be used to specify a list of modules that should never be bundled. By default,
projext will exclude all the dependencies from the |
|
includeTargets | Array | This setting can be used to specify a list of other targets you want to process on your bundle. This means that JS and SCSS files from these targets will be transpiled/processed. |
|
runOnDevelopment | boolean | This tells projext that when the target is builded (bundled/copied) on a development environment, it should execute it. |
|
watch | ProjectConfigurationTargetWatchOptions | The settings for the projext watch mode, which watches the target files for changes and updates the build without executing it. |
|
babel | ProjectConfigurationNodeTargetTemplateBabelSettings | The target transpilation options. |
|
flow | boolean | Whether or not your target uses flow. This will update the Babel configuration in order to add support and, in case it was disabled, enable transpilation. |
|
typeScript | boolean | Whether or not your target uses TypeScript. This will update the Babel configuration in order to add support and, in case it was disabled, enable transpilation. |
|
library | boolean | If the project is bundled, this will tell the build engine that it needs to be builded as a
library to be |
|
libraryOptions | ProjectConfigurationNodeTargetTemplateLibraryOptions | In case |
|
cleanBeforeBuild | boolean | Whether or not to remove all code from previous builds from the distribution directory when making a new build. |
|
copy | Array | A list of files to copy during the bundling process. It can be a list of file paths relative to the target source directory, in which case they'll be copied to the target distribution directory root; or a list of ProjectConfigurationTargetTemplateCopyItem. |
|
is | TargetTypeCheck | To check whether the target type is |
|
paths | TargetPaths | The target absolute paths to both the source directory folder and the distribution directory folder. |
|
folders | TargetFolders | The target relative paths to both the source directory folder and the distribution directory folder. |
|
dotEnv | ProjectConfigurationTargetTemplateDotEnvSettings | These options are used by both projext and the build engine in order to load "environment files". |
public ProjectConfigurationBrowserTargetTemplate: Object source
Properties:
Name | Type | Attribute | Description |
engine | string |
|
This will tell projext which build engine you are going to bundle the target code with. |
hasFolder | boolean |
|
Whether your target code is on a sub folder of the source directory ( |
createFolder | boolean |
|
Whether or not to create a folder for your targets code on the distribution directory when the target is bundled/copied. |
folder | string |
|
If either |
entry | ProjectConfigurationTargetTemplateEntry |
|
The target entry files for each specific build type. |
output | ProjectConfigurationTargetTemplateOutput |
|
The target output settings for each specific build type. |
sourceMap | ProjectConfigurationTargetTemplateSourceMapSettings |
|
The target source map settings for each specific environment build. |
html | ProjectConfigurationBrowserTargetTemplateHTMLSettings |
|
In the case the target is an app, these are the options for the |
css | ProjectConfigurationBrowserTargetTemplateCSSSettings |
|
These options help you customize the way the bundling process handles your CSS code. |
includeModules | Array |
|
This setting can be used to specify a list of node modules you want to process on your bundle. This means that JS files from modules on this list will be transpiled. |
includeTargets | Array |
|
This setting can be used to specify a list of other targets you want to process on your bundle. This means that JS and SCSS files from these targets will be transpiled/processed. |
uglifyOnProduction | boolean |
|
When a bundle is created, this setting will tell the build engine whether to uglify the code for production or not. |
runOnDevelopment | boolean |
|
This will tell the build engine that when you build the target for a development environment,
it should bring up an |
watch | ProjectConfigurationTargetWatchOptions |
|
The settings for the projext watch mode, which watches the target files for changes and updates the build without executing it. |
babel | ProjectConfigurationBrowserTargetTemplateBabelSettings |
|
These options are used by the build engine to configure Babel: |
flow | boolean |
|
Whether or not your target uses flow. This will update the Babel configuration in order to add support for it. |
typeScript | boolean |
|
Whether or not your target uses TypeScript. This will update the Babel configuration in order to add support for it. |
library | boolean |
|
This will tell the build engine that it needs to be builded as a library to be |
libraryOptions | ProjectConfigurationBrowserTargetTemplateLibraryOptions |
|
In case |
cleanBeforeBuild | boolean |
|
Whether or not to remove all code from previous builds from the distribution directory when making a new build. |
copy | Array |
|
A list of files to copy during the bundling process. It can be a list of file paths relative to the target source directory, in which case they'll be copied to the target distribution directory root; or a list of ProjectConfigurationTargetTemplateCopyItem. |
dotEnv | ProjectConfigurationTargetTemplateDotEnvSettings |
|
These options are used by both projext and the build engine in order to load "environment files". |
devServer | ProjectConfigurationBrowserTargetTemplateDevServerSettings |
|
These are the options for the |
configuration | ProjectConfigurationBrowserTargetTemplateConfigurationSettings |
|
These are the settings for the feature that allows a browser target to have a dynamic configuration file. |
public ProjectConfigurationBrowserTargetTemplateBabelSettings: Object source
Properties:
Name | Type | Attribute | Description |
features | ProjectConfigurationTargetTemplateBabelFeatures |
|
This object can be used to enable/disable the Babel plugins projext includes.
If you need other plugins, they can be included on the |
browserVersions | number |
|
When building the Babel configuration, projext uses the |
mobileSupport | boolean |
|
If |
polyfill | boolean |
|
Whether or not the configuration for the |
overwrites | Object |
|
If you know how to use Babel and need stuff that is not covered by projext, you can use this setting to overwrite/add any value you may need. |
env | Object |
|
Custom settings that projext will use as base when generating the ones for the
|
public ProjectConfigurationBrowserTargetTemplateCSSSettings: Object source
Properties:
Name | Type | Attribute | Description |
modules | boolean |
|
Whether or not your application uses CSS Modules. If this is enabled, all your styles will be prefixed with a unique identifier. |
inject | boolean |
|
If this setting is set to |
public ProjectConfigurationBrowserTargetTemplateConfigurationSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean |
|
Whether or not the feature is enabled. |
default | null | Object |
|
The default configuration. If none is specified, when the target is builded, it will try to
use |
path | string |
|
The path where the configuration files are located. |
hasFolder | boolean |
|
Whether or not there's a folder with the target name on the configuration path. |
defineOn | string |
|
The name of the variable where the configuration is going to be replaced on your code when bundled. |
environmentVariable | string |
|
The name of the environment variable projext will check when building the target in order to load a dynamic configuration. |
loadFromEnvironment | boolean |
|
Whether or not projext should check for the environment variable value. |
filenameFormat | string |
|
The name format of the configuration files. |
public ProjectConfigurationBrowserTargetTemplateDevServerProxiedSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean |
|
Whether or not the dev server is being proxied. |
host | string |
|
The host used to proxy the dev server. If |
https | boolean |
|
Whether or not the proxied host uses |
public ProjectConfigurationBrowserTargetTemplateDevServerSettings: Object source
Properties:
Name | Type | Attribute | Description |
port | number |
|
The server port. |
reload | boolean |
|
Whether or not to reload the browser when the code changes. |
open | boolean |
|
Whether or not to open the browser when server is ready. |
host | string |
|
The dev server hostname. |
ssl | ProjectConfigurationBrowserTargetTemplateDevServerSSLSettings |
|
The paths to the files to enable SSL on the dev server. |
proxied | ProjectConfigurationBrowserTargetTemplateDevServerProxiedSettings |
|
When the dev server is being proxied (using |
public ProjectConfigurationBrowserTargetTemplateHTMLSettings: Object source
Properties:
Name | Type | Attribute | Description |
default | string |
|
This setting can be used to set the same value of default |
template | string |
|
The file inside your target source that will be used to generate the |
filename | string |
|
The file that will be generated when your target is bundled. It will automatically include
the |
public ProjectConfigurationCopyFeatureSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean |
|
Whether or not the feature is enabled. |
items | Array |
|
A list of files and/or directories that will be copied. All with paths relative to the project directory. |
copyOnBuild | ProjectConfigurationFeatureTriggerSettings |
|
Since the feature is also available through the projext CLI, you can configure how the feature behaves when building. |
public ProjectConfigurationFeatureTriggerSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean |
|
Whether or not the feature should be triggered when a target is being build. |
onlyOnProduction | boolean |
|
This tells projext if the feature should be triggered only when building for production, or if it should do it for development too. |
targets | Array |
|
This can be used to specify the targets that will trigger the feature when builded. If no target is specified, the feature will be triggered by all the targets. |
public ProjectConfigurationNodeTargetInspectSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean |
|
Whether or not to enable the Node inspector when running the app for development. |
host | string |
|
The host where the Node inspector will run. |
port | number |
|
The port the Node inspector will use. |
command | string |
|
The Node inspector flag command ( |
ndb | boolean |
|
Whether or not to use Google's ndb instead of the native inspector. The way it will be used will be by calling the executable without path, so it's up to the project to install it (global or local). |
public ProjectConfigurationNodeTargetTemplate: Object source
Properties:
Name | Type | Attribute | Description |
bundle | boolean |
|
Whether or not the target needs to be bundled.
If the value is |
transpile | boolean |
|
This option is kind of tied to the previous one: You may not want to bundle your Node target, but you can transpile it with Babel if you want to use a feature not yet supported by the runtime. |
engine | string |
|
In case |
hasFolder | boolean |
|
Whether your target code is on a sub folder of the source directory ( |
createFolder | boolean |
|
Whether or not to create a folder for your targets code on the distribution directory when the target is bundled/copied. |
folder | string |
|
If either |
entry | ProjectConfigurationTargetTemplateEntry |
|
The target entry files for each specific build type. |
output | ProjectConfigurationTargetTemplateOutput |
|
The target output settings for each specific build type. |
sourceMap | ProjectConfigurationTargetTemplateSourceMapSettings |
|
The target source map settings for each specific environment build. |
inspect | ProjectConfigurationNodeTargetInspectSettings |
|
The target settings for the Node inspector. |
css | ProjectConfigurationNodeTargetTemplateCSSSettings |
|
These options help you customize the way the bundling process handles your CSS code. |
includeModules | Array |
|
This setting can be used to specify a list of node modules you want to process on your bundle. |
excludeModules | Array |
|
This setting can be used to specify a list of modules that should never be bundled. By default,
projext will exclude all the dependencies from the |
includeTargets | Array |
|
This setting can be used to specify a list of other targets you want to process on your bundle. This means that JS and SCSS files from these targets will be transpiled/processed. |
runOnDevelopment | boolean |
|
This tells projext that when the target is builded (bundled/copied) on a development environment, it should execute it. |
watch | ProjectConfigurationTargetWatchOptions |
|
The settings for the projext watch mode, which watches the target files for changes and updates the build without executing it. |
babel | ProjectConfigurationNodeTargetTemplateBabelSettings |
|
The target transpilation options. |
flow | boolean |
|
Whether or not your target uses flow. This will update the Babel |
typeScript | boolean |
|
Whether or not your target uses TypeScript. This will update the Babel configuration in order to add support and, in case it was disabled, enable transpilation. |
library | boolean |
|
If the project is bundled, this will tell the build engine that it needs to be builded as a
library to be |
libraryOptions | ProjectConfigurationNodeTargetTemplateLibraryOptions |
|
In case |
cleanBeforeBuild | boolean |
|
Whether or not to remove all code from previous builds from the distribution directory when making a new build. |
copy | Array |
|
A list of files to copy during the bundling process. It can be a list of file paths relative to the target source directory, in which case they'll be copied to the target distribution directory root; or a list of ProjectConfigurationTargetTemplateCopyItem. |
dotEnv | ProjectConfigurationTargetTemplateDotEnvSettings |
|
These options are used by both projext and the build engine in order to load "environment files". |
public ProjectConfigurationNodeTargetTemplateBabelSettings: Object source
Properties:
Name | Type | Attribute | Description |
features | ProjectConfigurationTargetTemplateBabelFeatures |
|
This object can be used to enable/disable the Babel plugins projext includes.
If you need other plugins, they can be included on the |
nodeVersion | string |
|
When building the Babel configuration, projext uses the |
env | Object |
|
Custom settings that projext will use as base when generating the ones for the
|
overwrites | Object |
|
If you know how to use Babel and need stuff that is not covered by projext, you can use this setting to overwrite/add any value you may need. |
public ProjectConfigurationNodeTargetTemplateCSSSettings: Object source
Properties:
Name | Type | Attribute | Description |
modules | boolean |
|
Whether or not your application uses CSS Modules. If this is enabled, all your styles will be prefixed with a unique identifier. |
public ProjectConfigurationNodeTargetTemplateLibraryOptions: Object source
Properties:
Name | Type | Attribute | Description |
libraryTarget | string |
|
How the library will be exposed: |
public ProjectConfigurationNodemonSettings: Object source
Properties:
Name | Type | Attribute | Description |
legacyWatch | boolean |
|
Whether or not to enable |
public ProjectConfigurationOtherSettings: Object source
Properties:
Name | Type | Attribute | Description |
These | ProjectConfigurationTargetFinderSettings | are the settings for projext "targets finder", the feature that reads the project in order to identify targets and their settings. |
|
This | ProjectConfigurationWatchSettings | is used by projext to configure |
|
This | ProjectConfigurationNodemonSettings | is used by projext to configure |
public ProjectConfigurationPathSettings: Object source
Properties:
Name | Type | Attribute | Description |
source | string |
|
The directory, relative to your project path, where your targets code is located. On the documentation is often referred as the "source directory". |
build | string |
|
The directory, relative to your project path, where your targets bundled code will be located. On the documentation is often referred as the "distribution directory". |
privateModules | string |
|
This is for the feature that copies when bundling. In case you are using the feature to copy an npm module that, let's say, is not published, projext will save that module (without its dependencies) on that folder. |
public ProjectConfigurationSettings: Object source
Properties:
Name | Type | Attribute | Description |
paths | ProjectConfigurationPathSettings |
|
This setting is all about where your code is located and where it will be bundled |
targetsTemplates | ProjectConfigurationTargetTemplates |
|
There was no way to have "smart defaults" for targets and at the same time allow projext
an unlimited amount of targets, and that's why the this setting exists.
The targets will extend the template which name is the same as their |
targets | Object | This will be a dictionary with the Target definitions. |
|
copy | ProjectConfigurationCopyFeatureSettings |
|
These settings are for the feature that enables projext to copy files when building targets. |
version | ProjectConfigurationVersionSettings |
|
These settings are for the feature that manages your project version. |
others | ProjectConfigurationOtherSettings |
|
Miscellaneous options. |
public ProjectConfigurationTargetFinderSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean |
|
Whether or not to automatically search for targets on the project folders. |
public ProjectConfigurationTargetTemplateBabelFeatures: Object source
Properties:
Name | Type | Attribute | Description |
classProperties | boolean |
|
This enables |
decorators | boolean |
|
This enables |
dynamicImports | boolean |
|
This enables |
objectRestSpread | boolean |
|
This enables |
public ProjectConfigurationTargetTemplateCopyItem: Object source
Properties:
Name | Type | Attribute | Description |
from | string | The path to the file, relative to the target source directory. |
|
to | string |
|
The path where the file will be copied, relative to the target distribution directory. If not specified, the file will be copied to the root of the target distribution directory. |
public ProjectConfigurationTargetTemplateEntry: Object source
Properties:
Name | Type | Attribute | Description |
default | string |
|
The target entry file for all types of build that don't have a specified entry. |
development | string |
|
The target entry file on a development build. If |
production | string |
|
The target entry file on a production build. If |
public ProjectConfigurationTargetTemplateOutput: Object source
Properties:
Name | Type | Attribute | Description |
default | ProjectConfigurationTargetTemplateOutputPaths |
|
The target output settings for all types of build that don't have specified settings. |
development | ProjectConfigurationTargetTemplateOutputPaths |
|
The target output settings on a development build. If |
production | ProjectConfigurationTargetTemplateOutputPaths |
|
The target output settings on a production build. If |
public ProjectConfigurationTargetTemplateOutputPaths: Object source
Properties:
Name | Type | Attribute | Description |
js | string |
|
The path to generated Javascript files on the distribution directory. The available placeholders are:
The default value is:
|
css | string |
|
The path to generated stylesheets on the distribution directory. The available placeholders are:
The default value is, for both
|
fonts | string |
|
The path to font files once they are copied to the distribution directory. The available placeholders are:
The default value is, for both
|
fonts | string |
|
The path to image files once they are copied to the distribution directory. The available placeholders are:
The default value is, for both
|
public ProjectConfigurationTargetTemplates: Object source
Properties:
Name | Type | Attribute | Description |
node | ProjectConfigurationNodeTargetTemplate |
|
The template settings for all targets with the type |
browser | ProjectConfigurationBrowserTargetTemplate |
|
The template settings for all targets with the type |
public ProjectConfigurationTargetWatchOptions: Object source
Properties:
Name | Type | Attribute | Description |
development | boolean |
|
Whether or not to watch the target files when it gets build for development. If the target type is Node and it doesn't require bundling nor transpiling, it won't do anything. |
production | boolean |
|
Whether or not to watch the target files when it gets build for production. |
public ProjectConfigurationVersionRevisionSettings: Object source
Properties:
Name | Type | Attribute | Description |
enabled | boolean |
|
Whether or not the revision file feature is enabled. |
copy | boolean |
|
Whether or not to copy the revision file when the project files are being copied to the distribution directory. |
filename | string |
|
The name of the revision file. |
createRevisionOnBuild | ProjectConfigurationFeatureTriggerSettings |
|
Since the feature is also available through the projext CLI, you can configure how the feature behaves when building. |
public ProjectConfigurationVersionSettings: Object source
Properties:
Name | Type | Attribute | Description |
defineOn | string |
|
The name of the variable where the version is going to be replaced on your code when bundled. |
environmentVariable | string |
|
The name of the environment variable projext should check to get the project version. |
revision | ProjectConfigurationVersionRevisionSettings |
|
This is like a sub-feature. A revision file is a file that contains the version of your project. This is useful when deploying the project to an environment where you have no access to the environment variable. The way the revision file works is by first checking if the environment variable is available
and, if not, it will check if the project is on a |
public ProjectConfigurationWatchSettings: Object source
Properties:
Name | Type | Attribute | Description |
poll | boolean |
|
Whether or not to use polling to get the changes on the file system, and if so, it can also be used to specify the ms interval. |
public Provider: Object source
Properties:
Name | Type | Attribute | Description |
register | ProviderRegisterMethod | The method that gets called by projext when registering the provider. |
public ProviderRegisterMethod(app: Projext): function source
Params:
Name | Type | Attribute | Description |
app | Projext | A reference to the projext dependency injection container. |
public Target: BrowserTarget | NodeTarget source
public TargetConfigurationCreator(overwritePath: string, baseConfiguration: ConfigurationFile): ConfigurationFile: function source
Params:
Name | Type | Attribute | Description |
overwritePath | string | The path to the file that can create the configuration. |
|
baseConfiguration | ConfigurationFile | The configuration service that will be extended. |
public TargetExtraFile: Object source
Properties:
Name | Type | Attribute | Description |
from | string | The file origin path. |
|
to | string | The file destination path. |
|
transform | TargetExtraFileTransform |
|
A custom function to modify the contents of the file to copy. |
public TargetExtraFileTransform(contents: Buffer): Promise<string, Error>: function source
Params:
Name | Type | Attribute | Description |
contents | Buffer | The original contents of the file. |
public TargetFileRuleFilesSettings: Object source
Properties:
Name | Type | Attribute | Description |
include | Array | The list of expressions that match the allowed files for a rule. |
|
exclude | Array | The list of expressions that match the files that should be excluded from a rule. |
|
glob | TargetFileRuleGlobFilesSettings | The settings for files but on glob pattern version. For plugins and libraries that don't support, or maybe prefer glob over, expressions. |
public TargetFileRuleHandler(target: Target, hasTarget: boolean, currentRule: TargetFileRuleSettings): function source
Params:
Name | Type | Attribute | Description |
target | Target | The target information. |
|
hasTarget | boolean | Whether or not the rule already has a target, or if this is the first one being added. |
|
currentRule | TargetFileRuleSettings | The current settings of the rule. |
public TargetFileRuleSettings: Object source
Properties:
Name | Type | Attribute | Description |
extension | RegExp | A expression that validates the extension(s) the rule is for. |
|
glob | string | A glob pattern that validates the extension(s) the rule is for. |
|
paths | TargetFileRulePathSettings | A set of allowed and excluded expressions to validate the paths where the files can be found. |
|
files | TargetFileRuleFilesSettings | A set of allowed and excluded expressions and glob patterns for files that would match with the rule. |
public TargetFilesRules: Object source
Properties:
Name | Type | Attribute | Description |
js | TargetFileRule | The rule for JS files. |
|
scss | TargetFileRule | The rule for SCSS files. |
|
css | TargetFileRule | The rule for CSS files. |
|
fonts | TargetFontsFileRules | The rules for font files. |
|
images | TargetFileRule | The rule for image files. |
|
favicon | TargetFileRule | The rule for favicon files. |
public TargetFontsFileRules: Object source
Properties:
Name | Type | Attribute | Description |
common | TargetFileRule | The rule for all font files that aren't SVG. |
|
svg | TargetFileRule | The rule for SVG fonts. |