frontful-common
v4.0.6
Published
Common configuration provider for Frontful infrastructure
Downloads
72
Readme
frontful-common
is common configuration provider for Frontful infrastructure. It has no use outside Frontful infrastructure and is packaged and deployed for internal code reuse purposes only.
Package development assist
When developing a package it may be helpful to test it in playground project and immediately see changes when updating package code without need to rebuild, redeploy and reinstall package and restart test project. npm link
and yarn link
partially helps, but you still either need to rebuild your package or write it in ES5 and project restart is still needed.
Package development assist focuses on making package development and testing in the project seamless. Change package code and project will be rebuilt and reloaded as if you changed local project file.
Streamlined package development process can be beneficial in decoupling of larger applications and help distributed teams work on modules instead of single codebase. Package development assist is used in developing all Frontful packages and has shown to be efficient way of developing and maintaining several decoupled projects in production.
To benefit from Package development assist
- Playground project must use
frontful-environment
- Package should be built using
babel-preset-frontful
or be compatible with its Babel preset - Install package in playground project by executing
yarn add my_package
- Register package link by executing
yarn link
in the root of the package - Link package to playground project by executing
yarn link my_package
in the root of the project - In playground projects
package.json
underfrontful.common.packages
array add name of the package. For details on configuration mechanics seefrontful-config
// package.json
{
"frontful": {
"common": {
"packages": ["my_package"]
}
}
}
- Start playground project, change package code and watch everything reload