UI framework, that provides Enonic applications with core components and styles.
Place the following dependency in your build.gradle file:
dependencies {
include 'com.enonic.lib:lib-admin-ui:1.2.0'
}Content Studio links the dev jar's sources: "@enonic/lib-admin-ui": "link:.xp/dev/lib-admin-ui". pnpm installs nothing for a link: dependency, so a consumer declares every package this library's modules import: the runtime ones listed in dependencies here and the peers (@enonic/input-types, @enonic/ui, @enonic/ui-utils, lucide-react, preact). @enonic/input-types and @enonic/ui-utils carry the data model classes (PropertyTree, Value, LocalDate, …) and must exist once on the page, which is why they are peers; @enonic/ui-types is types only and a plain dependency. @enonic/input-types imports react, so the consumer's bundler maps react and react-dom to preact/compat.
One copy of this library per page: the data model compares with instanceof, so two bundles of the dev sources must not both be loaded.
Run the following command to build with default options:
./gradlew build
The project will be built in production environment by default.
But you can also set it explicitly by passing the env parameter with environment type:
./gradlew build -Penv=dev
There are only two options that are available now:
proddev
Both environments are almost identical, except that building in the development environment will result in creating the DTS files, sourcemaps and other things, critical for the debugging. The build itself may also be a bit slower sometimes.
Sometimes, you may want to build your project faster. To do so, just skip the linting (lint task) and testing (test task):
./gradlew build -x lint -x test
In case you want forcefully update all your node dependencies, use:
./gradlew npmInstallForce
Take a note, that you can also use aliases in Gradle, and nIF would be just enough to run npmInstallForce.
Some code and configs are shared across the application. They are moved to the separate repository and published as npm packages.
Common .less styles and mixins can be also found under enonic-admin-artifacts.