subjektify-toolbox
is a comprehensive package that includes essential tools and utilities for developing decentralized applications with Subjektify. This package simplifies the development process by providing a suite of commands and configurations that streamline the setup, build, and deployment of your dApps.
- Clean: Remove generated files and artifacts to maintain a clean workspace.
- Build: Parse, validate, and compile Subjekt model files.
- Code Generation: Generate code based on your Subjekt model.
- Documentation Generation: Generate documentation from your Subjekt model.
- Deployment: Automate the deployment of your Subjektify projects.
You can install subjektify-toolbox
via npm:
npm install --save-dev @subjektifylabs/subjektify-toolbox
or yarn:
yarn add --dev @subjektifylabs/subjektify-toolbox
subjektify-toolbox
provides several commands that can be used through the Subjektify CLI. Below are some of the primary tasks included in the toolbox.
Remove generated files and artifacts:
npx subjektify clean
Parse, validate, and compile Subjekt model files:
npx subjektify build
Generate code based on your Subjekt model:
npx subjektify codegen
Generate documentation from your Subjekt model:
npx subjektify docgen
Automate the deployment of your Subjektify projects:
npx subjektify deploy
subjektify-toolbox
extends the Subjektify runtime environment by providing additional tasks and configuration options. These extensions make it easier to manage various aspects of your dApp development lifecycle, from initial setup to deployment.
Here’s a more comprehensive example configuration in subjektify.config.ts
:
import { SubjektifyConfig } from "subjektify";
const config: SubjektifyConfig = {
namespace: "my.dapp",
version: "1.0.0",
license: "MIT",
clean: {
paths: ["dist", "build", "artifacts"],
},
build: {
sources: ["subjects"],
outputDirectory: "artifacts",
projections: {
MyProjection: {
transformations: [
{
type: "excludeByTrait",
args: { traits: ["internal"] },
},
],
},
},
},
codegen: [
{
target: "client",
language: "typescript",
outputDirectory: "src/client",
},
{
target: "contract",
language: "solidity",
outputDirectory: "contracts/generated",
},
],
};
export default config;
This configuration example shows how to set up various tasks such as cleaning, building, code generation, and more.
This project is licensed under the MIT License. See the LICENSE file for details.