@portfoliablejs/create-portfoliable
v0.5.3
Published
Unified Portfoliable package with initializer and runtime CLI
Downloads
451
Maintainers
Readme
create-portfoliable User Manual
This guide is the end-user instruction manual for projects created with:
npm create portfoliable@latestUse this document after scaffolding to run, customize, validate, and ship your portfolio application.
1. What This Tool Creates
The initializer generates a Vite-based portfolio app with:
- app shell and UI wiring
- case markdown loading and parsing pipeline
- content validation commands
- build and preview scripts
- case scaffolding utilities
2. Prerequisites
Before creating a project:
- install Node.js 18 or newer
- verify npm is available
- use a writable local directory
- ensure internet access for package download
Check your environment:
node -v
npm -v3. Create a New Portfolio Project
Scaffold a new app:
npm create portfoliable@latest my-portfolioMove into the project:
cd my-portfolioStart development mode:
npm run portfoliable4. Initializer Flags
Pass flags after --:
npm create portfoliable@latest my-portfolio -- --no-install
npm create portfoliable@latest my-portfolio -- --forceFlag reference:
--no-install: scaffold files without installing dependencies--force: allow overwrite when target exists
5. Generated Commands
Your generated project includes these scripts:
npm run portfoliable- run local development servernpm run portfoliable-build- create production buildnpm run portfoliable-preview- preview production outputnpm run portfoliable-thumbnail-options- inspect available thumbnail device optionsnpm run portfoliable-create-case- create new starter case filenpm run portfoliable-scaffold-case- legacy alias for case creation
6. Daily Development Workflow
Recommended sequence:
- run dev server
- edit case markdown content and assets
- validate content contract
- build and preview before publishing
Typical command flow:
npm run portfoliable
npm run portfoliable-build
npm run portfoliable-preview7. Content Structure and Contract
Case files are stored as markdown under the generated content directory.
Each case requires frontmatter with localized fields:
idslugtitle.enandtitle.ptshortDesc.enandshortDesc.ptreadTime.enandreadTime.ptyear.enandyear.ptthumbSrc.enandthumbSrc.pt
Optional but commonly used fields include:
desc.enanddesc.ptdescRecruiterrepositoryUrlliveUrlvideoSrcvttSrcaudioSrcaudioSrcRecruiter
For framed thumbnails, configure:
thumbCategorythumbBrandthumbModelthumbColor
Body content must include language sections expected by the parser.
8. Create a New Case
Generate a starter case:
npm run portfoliable-create-case -- --name "Checkout Revamp"Legacy alias:
npm run portfoliable-scaffold-case -- --name "Checkout Revamp"9. Thumbnail Device Options
Inspect supported values:
npm run portfoliable-thumbnail-options
npm run portfoliable-thumbnail-options -- --full
npm run portfoliable-thumbnail-options -- --jsonUse exact category/brand/model/color values from command output to avoid mismatches.
10. Validation and Build Gates
Run before commit or deployment:
npm run validate:content
npm run portfoliable-build
npm run portfoliable-previewIf validation fails, correct frontmatter keys and language sections first.
11. Troubleshooting
npm create cannot fetch package
- verify npm registry connectivity
- retry after checking package availability
Content validation errors
- add missing required frontmatter keys
- ensure both language sections are present and correctly marked
Thumbnail not rendering as expected
- rerun thumbnail options command
- verify values are exact matches from catalog output
Build succeeds but preview is incorrect
Reset local dependencies and rebuild:
rm -rf node_modules package-lock.json
npm install
npm run portfoliable-build
npm run portfoliable-preview12. Upgrade Guidance for Existing Projects
When updating dependencies in an existing generated project:
- update package versions
- run validation
- build and preview
- verify parser output and media rendering behavior
13. Minimal Quick Start
npm create portfoliable@latest my-portfolio
cd my-portfolio
npm run portfoliableAfter that, edit your case markdown files and keep validation/build checks in your routine.
