Skip to content

Development Setup

Set up your local environment for contributing to Podcast Framework.

  • Node.js 18+
  • npm 9+
  • Git
  • VS Code (recommended)
Terminal window
git clone https://github.com/rejected-media/podcast-framework.git
cd podcast-framework
Terminal window
npm install

This installs dependencies for all packages in the monorepo.

podcast-framework/
├── packages/
│ ├── core/ # @rejected-media/podcast-framework-core
│ ├── sanity-schema/ # @rejected-media/podcast-framework-sanity-schema
│ ├── cli/ # @rejected-media/podcast-framework-cli
│ └── create-podcast-framework/ # @rejected-media/create-podcast-framework
├── package.json # Monorepo config
└── README.md
Terminal window
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests for specific package
cd packages/core
npm test
Terminal window
# Build all packages
npm run build
# Build specific package
cd packages/core
npm run build
Terminal window
# In podcast-framework/packages/core
npm link
# In your test podcast
npm link @rejected-media/podcast-framework-core

Now your test podcast uses your local development version!

  1. Make changes in packages/core/
  2. Build: npm run build
  3. Test in linked podcast: npm run dev
  4. Verify changes work
  5. Write tests
  6. Run tests: npm test
Terminal window
npm run lint
Terminal window
npm run format
Terminal window
npm run type-check
{
"recommendations": [
"astro-build.astro-vscode",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
]
}
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
},
"typescript.tsdk": "node_modules/typescript/lib"
}

The template repository serves as an example:

Terminal window
git clone https://github.com/rejected-media/podcast-template.git
cd podcast-template
npm install
npm run dev
  1. Create packages/core/src/components/NewComponent.astro
  2. Add tests: packages/core/src/components/NewComponent.test.ts
  3. Export in packages/core/src/index.ts
  4. Build: npm run build
  5. Test: npm test
  6. Document in docs
  1. Add to packages/core/src/lib/utils.ts
  2. Add tests: packages/core/src/lib/utils.test.ts
  3. Export in packages/core/src/index.ts
  4. Build and test
  1. Edit packages/sanity-schema/src/schemas/[schema].ts
  2. Add tests
  3. Build and test
  4. Update migration guide if breaking change

Maintainers only:

Terminal window
# Update version
npm version patch # or minor, major
# Build
npm run build
# Publish
npm publish

Your contributions make Podcast Framework better for everyone!