- Notifications
You must be signed in to change notification settings - Fork0
ServiceStack/create-net
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Create .NET and other projects from NetCoreTemplates GitHub repositories.
npx create-net<repo|ls> [ProjectName]
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).
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 nextjsThis 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
- Downloads the GitHub repository archive from the specified repository
- Extracts the archive into a folder named
<ProjectName>(or current directory if no ProjectName specified) - Replaces all variations of
MyAppwith variations of your<ProjectName>(or current directory name):My_App→Your_ProjectMy App→Your Projectmy-app→your-projectmy_app→your_projectmyapp→yourprojectmy.app→your.projectMyApp→YourProject
- Renames files and folders containing
MyAppvariations - Runs
npm installin all directories containingpackage.json
- Node.js >= 14.0.0
Two test scripts are provided to verify the functionality:
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
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.
The package is automatically published to npm with provenance when a new GitHub release is created:
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)
Push changes and tags:
git push&& git push --tagsCreate 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 publicflag
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.
MIT
About
npx create-net <template> <project>
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.