Skip to content

Conversation

@sameerkali
Copy link
Contributor

PWA Features

New PWA option in CLI prompts

Automatic vite-plugin-pwa setup with service worker

Install button and online/offline status indicators

Working PWA with caching strategies out of the box

Code Structure

Split large index.js into organized modules (lib/utils.js, lib/pwa.js, lib/css-frameworks.js, lib/templates.js)

Reduced main file from 300+ lines to under 100 lines

Better error handling with automatic directory creation

Generated Projects

Clean App component with PWA indicators when enabled

Comprehensive README with PWA testing and deployment guide

Automatic boilerplate cleanup

Placeholder icons with replacement instructions

Bug Fixes

Fixed ENOENT error when creating hook files

Proper folder structure creation before writing files

Enhanced file writing with directory checks

Testing
Tested PWA generation with all CSS frameworks

Verified service worker and install functionality

Confirmed offline capabilities work correctly

README generation includes proper PWA instructions

…d CSS framework handling; enhance user input collection and streamline project initialization process.
@codezaura
Copy link

Move directory name array inside a constant file.

Later it can be extended without making a change on index.js file, which is the main entry point.

@harshgupta20 harshgupta20 added the enhancement New feature or request label Aug 17, 2025
@harshgupta20
Copy link
Owner

harshgupta20 commented Aug 17, 2025

image @sameerkali Give Project Name -> Selected Tailwind -> Selected PWA (y)

-> Your code refactor is appreciated but currently please make all update within index.js file.

@harshgupta20 harshgupta20 self-requested a review August 17, 2025 18:27
@harshgupta20
Copy link
Owner

@sameerkali We are good to go with directory structure, but error still needs to be resolved.

Copy link
Owner

@harshgupta20 harshgupta20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflict doesn't exist anymore. Merging the PR.

Thanks @sameerkali , to make it more contributor friendly ✨

Commented statement can be done later for beginner first issues.

Comment on lines +100 to +101
console.log(`\n📱 To test PWA:\n npm run build\n npm run preview\n Open http://localhost:4173 and test install/offline features`);
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the port number from 4173 to 5173

@harshgupta20 harshgupta20 merged commit 9e3bf4f into harshgupta20:master Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants