Abyss config
The .abyss config is used to control the build, environments, environment variables, and other settings. The folder should contain two .json files. One environments.json file to control the various application environments and their associated variables. The second settings.json to set the configuration of each product.
See the environment documentation here.
Scripts
The @uhg-abyss/core package includes important scripts to run Storybook and build the Parcels.
Include the following scripts in your package.json file as well as @uhg-abyss/core as a dependency.
} ..., "dependencies": { "@uhg-abyss/core": "2.0.0", }, "scripts": { "dev": "abyss dev", "build": "abyss build", }, ...}- Run
devto compile Storybook to create and test your Parcels locally. - Run
buildto build and compile your Parcels for use in external apps.
Build
The standard Parcel file structure:
└── workshop| ├── .abyss│ | ├── environments.json│ | └── settings.json│ ├── src│ | └── apps| | | ├── ParcelOne| | | | ├── index.js| | | | ├── ParcelOne.jsx| | | | └── ParcelOne.stories.jsx| | | ├── ParcelTwo| | | | ├── index.js| | | | ├── ParcelTwo.jsx| | | | └── ParcelTwo.stories.jsx| | └── common| └── package.jsonParcel build file structure:
└── build| ├── env| | ├── dev| | | ├── assets| | | ├── parcels| | | | ├── my-parcel-one| | | | | └── my-parcel-one.js| | | | ├── my-parcel-two| | | | | └── my-parcel-two.js| | | └── config.js| | └── prod| | | ├── assets| | | ├── parcels| | | | ├── my-parcel-one| | | | | └── my-parcel-one.js| | | | ├── my-parcel-two| | | | | └── my-parcel-two.js| | | └── config.js| ├── version| | └── 1.2.0| | | ├── assets| | | ├── parcels| | | | ├── my-parcel-one| | | | | └── my-parcel-one.js| | | | ├── my-parcel-two| | | | | └── my-parcel-two.js| | | └── config.js| └── parcels.jsVersioning
The version of the Parcel when running the build script is based of the version of the package.json in the workshop directory. In the example above, the version in the package.json is 2.0.0. Versioning is global so all of your Parcels will bump versions in tandem.