create-ollie-shop
v0.2.2
Published
A CLI tool to create a new Ollie Shop e-commerce project with a modern tech stack and pre-built components.
Readme
create-ollie-shop
A CLI tool to create a new Ollie Shop e-commerce project with a modern tech stack and pre-built components.
Overview
create-ollie-shop is a scaffolding tool that helps you quickly set up a new e-commerce project using the Ollie Shop framework. It provides a selection of templates, components, and configurations to kickstart your online store development.
Requirements
- Node.js 20.x or higher
- pnpm 7.x or higher (recommended package manager)
Installation
Using pnpm create
pnpm create ollie-shop [project-name]Or use directly with npx
npx create-ollie-shop [project-name]Options
--store-id <id>- Specify an Ollie store ID--version-id <id>- Specify an Ollie store version ID--help- Display help information--version- Display version information
Examples
# Start interactive project bootstrapping
npx create-ollie-shop
# Create a new project with a custom name
npx create-ollie-shop my-awesome-store
# Create a new project with store configuration
npx create-ollie-shop my-store --store-id 7217542a-d7c6-40d3-a20e-db13b310a781 --version-id 882c8c18-550c-4ac5-9d3b-015d7dd25741Preview.js Plugin
Ollie Shop projects were designed to be previewed using the Preview.js plugin for VS Code. This tool allows developers to visualize and interact with components in isolation during development.
Installation
Simply install the Preview.js extension from the VS Code marketplace: VS Code Extension
Usage
Preview.js works seamlessly with properly bootstrapped Ollie Shop projects. After creating your project with create-ollie-shop, the Preview.js server will automatically read the Ollie configurations and set up accordingly.
To use Preview.js:
- Open any component file in your Ollie Shop project
- Click the Preview.js icon in the editor or press the keyboard shortcut
- A live preview of your component will appear, reflecting any changes you make in real-time
This integration allows you to develop and test components without needing to set up a separate development environment or manually configure Preview.js.
Development
To work on create-ollie-shop locally:
- Clone the repository
git clone [email protected]:ollie-shop/ollie-shop.git
cd ollie-shop- Install dependencies
pnpm install- Link local packages
# Navigate to the create-ollie-shop package directory
cd packages/create-ollie-shop
# Create a global link
pnpm link --global
# For working with other local packages, use pnpm link inside each package directory
# For example, to link the ollie-shop library:
cd ../ollie-shop
pnpm link --global
# Then, in the create-ollie-shop directory:
pnpm link --global ollie-shopNote: When using
pnpm link, make sure all linked packages have their dependencies installed. The link creates a symlink to your local package, allowing you to make changes and immediately see them reflected in projects that use the linked package.
- Build the package
pnpm build- Test your changes
pnpm testContributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT
