@subjektifylabs/subjektify-toolbox
v0.0.46
Published
A collection of essential tools and plugins recommended to start developing with Subjektify.
Readme
@subjektifylabs/subjektify-toolbox
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.
Features
- 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.
Installation
You can install subjektify-toolbox via npm:
npm install --save-dev @subjektifylabs/subjektify-toolboxor yarn:
yarn add --dev @subjektifylabs/subjektify-toolboxUsage
subjektify-toolbox provides several commands that can be used through the Subjektify CLI. Below are some of the primary tasks included in the toolbox.
Clean
Remove generated files and artifacts:
npx subjektify cleanBuild
Parse, validate, and compile Subjekt model files:
npx subjektify buildCode Generation
Generate code based on your Subjekt model:
npx subjektify codegenDocumentation Generation
Generate documentation from your Subjekt model:
npx subjektify docgenDeployment
Automate the deployment of your Subjektify projects:
npx subjektify deployEnvironment Extensions
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.
Example Configuration
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.
License
This project is licensed under the MIT License. See the LICENSE file for details.
