Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

npx create-net <template> <project>

NotificationsYou must be signed in to change notification settings

ServiceStack/create-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create .NET and other projects from NetCoreTemplates GitHub repositories.

Usage

npx create-net<repo|ls> [ProjectName]

Commands

List available templates:

npx create-net ls [org]

Create a project:

npx create-net<repo> [ProjectName]

IfProjectName is not specified, the script will use the current directory name and extract the template into the current directory (which must be empty).

Examples

List all available templates:

npx create-net ls

Shows all templates from NetCoreTemplates and NetFrameworkTemplates organizations.

List templates from a specific organization:

npx create-net ls NetFrameworkTemplates

Create a project in a new directory:

npx create-net nextjs MyProject

This downloads from:https://github.com/NetCoreTemplates/nextjs and creates aMyProject folder.

Create a project in the current directory:

mkdir my-projectcd my-projectnpx create-net nextjs

This uses the current directory name (my-project) and extracts the template into the current directory.

Create a project from a different organization:

npx create-net NetFrameworkTemplates/web-netfx MyProject

This downloads from:https://github.com/NetFrameworkTemplates/web-netfx

What it does

  1. Downloads the GitHub repository archive from the specified repository
  2. Extracts the archive into a folder named<ProjectName> (or current directory if no ProjectName specified)
  3. Replaces all variations ofMyApp with variations of your<ProjectName> (or current directory name):
    • My_AppYour_Project
    • My AppYour Project
    • my-appyour-project
    • my_appyour_project
    • myappyourproject
    • my.appyour.project
    • MyAppYourProject
  4. Renames files and folders containingMyApp variations
  5. Runsnpm install in all directories containingpackage.json

Requirements

  • Node.js >= 14.0.0

Testing

Two test scripts are provided to verify the functionality:

Automated Tests

Run automated tests that verify all scenarios and clean up afterwards:

./test.sh

This tests:

  • Creating a project with repo name and ProjectName
  • Creating a project with organization/repo and ProjectName
  • Creating a project without ProjectName (current directory)
  • Error handling for existing directories
  • Error handling for non-empty directories

Manual Tests

Run manual tests that leave the results for inspection:

./test-manual.sh

This creates test projects intest-manual/ for manual verification. Clean up withrm -rf test-manual/ when done.

Publishing

Automated Publishing (Recommended)

The package is automatically published to npm with provenance when a new GitHub release is created:

  1. Update the version:

    npm version patch# for bug fixes (1.0.0 → 1.0.1)npm version minor# for new features (1.0.0 → 1.1.0)npm version major# for breaking changes (1.0.0 → 2.0.0)
  2. Push changes and tags:

    git push&& git push --tags
  3. Create a GitHub release athttps://github.com/ServiceStack/create-net/releases/new

    • The GitHub Action will automatically run tests and publish to npm with provenance

Security Features:

  • Uses OIDC authentication for secure publishing
  • Generates provenance attestations for supply chain security
  • Published with--access public flag

Manual Publishing

To publish manually:

npm loginnpm publish --access public

Note: You need to configure theNPM_TOKEN secret in GitHub repository settings for automated publishing. See.github/workflows/README.md for details.

License

MIT

About

npx create-net <template> <project>

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp