Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 29, 2025

This PR implements three major optimizations to the dev init command:

🛡️ Enhanced Safety for Current Directory Initialization

When using dev init ./ to initialize in the current directory, the command now:

  • Detects existing files (excluding .git directories)
  • Prompts users for confirmation before potentially overwriting files
  • Displays a preview of existing files to help users make informed decisions
$ dev init ./
>> Directory /current/path contains existing files: package.json, src, README.md... <<

This may overwrite existing files. Continue? (y/N)

🎨 VSCode IDE Integration for All Templates

Added comprehensive VSCode support to enhance developer experience:

  • Auto-formatting: Format on save with Prettier
  • Auto-linting: ESLint fixes applied automatically on save
  • Smart imports: Automatic import organization and suggestions
  • Extension recommendations: Curated list of helpful VSCode extensions

All existing templates (ts-node, ts-bin) and the new template now include:

  • .vscode/settings.json with optimized TypeScript and linting configurations
  • .vscode/extensions.json with recommended extensions

🚀 New Frontend TypeScript Library Template

Introduces a new "TypeScript Web Library" template (tpl-ts-web) featuring:

  • Live development server: Webpack dev server with hot reload at localhost:3000
  • Interactive demo page: Beautiful HTML preview with live library testing capabilities
  • Modern build system: TypeScript 5, Webpack 5, ESLint, Jest
  • Multiple output formats: UMD for browsers, CommonJS for Node.js
  • Complete testing setup: Jest with jsdom environment and coverage reporting

The template includes a fully functional demo page that automatically reloads when code changes, making frontend library development fast and interactive.

📦 Template System Updates

  • Updated template list to include the new "TypeScript Web Library" option
  • Bumped versions for existing templates with new VSCode configurations
  • Maintained backward compatibility with existing workflows

All changes follow minimal modification principles while significantly enhancing the developer experience for TypeScript project initialization.

Fixes #55.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • unpkg.com
    • Triggering command: node /home/REDACTED/work/make-dev-fast/make-dev-fast/packages/dev/bin/dev.js init ./ (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… web template

Co-authored-by: echosoar <14832743+echosoar@users.noreply.github.com>
Copilot AI changed the title [WIP] dev init optimise feat: enhance dev init with file detection, VSCode support, and new web template Aug 29, 2025
Copilot AI requested a review from echosoar August 29, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dev init optimise

2 participants