Development Command
Overview
The dev
command starts the development server for the @padmadev/core
package. It validates the project setup and uses the appropriate package manager to run the development server in the core
folder.
Usage
Run the following command:
npx padma dev
Command Behavior
-
Verify Settings File
- Ensures
padma.settings.json
exists in the project root. - Validates that the file defines an
activeTheme
.
- Ensures
-
Validate Core Directory
- Confirms the
core
folder exists. - Suggests running
npx padma generate core
if the folder is missing.
- Confirms the
-
Detect Package Manager
- Detects the package manager based on the presence of lock files:
yarn.lock
→ Yarnpnpm-lock.yaml
→ pnpmpackage-lock.json
→ npm
- Detects the package manager based on the presence of lock files:
-
Run the Dev Command
- Executes the corresponding
dev
script:yarn dev
,pnpm dev
, ornpm run dev
.
- Executes the corresponding
Example Output
Successful Start
Running "npm run dev" in /path/to/project/core
> core@0.1.0 dev /path/to/project/core
> nodemon index.js
Development server running at http://localhost:3000