Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(projects): Samples and starters #33

Merged
merged 10 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Builds the web app for production to the `build` folder. It correctly bundles Re

## Sample Command Lines

Once packaged, you can install the command line locally via `npx mctools-<version>.tgz`. Some sample command lines:
Once packaged, you can install the command line locally via `npm install minecraft-creator-tools-<version>.tgz`. If you'd like to make Minecraft Creator Tools available across your device, you can install it globally via `npm install -g minecraft-creator-tools-<version>.tgz`.

Some sample command lines:

`npx mct`

Expand All @@ -81,6 +83,14 @@ Loads the project folder `d:\mycontent\myprojectfolder`, validates using the 'ad

Loads the project file `d:\mycontent\packages\myaddon.mcaddon`, validates using the 'addon' suite of strict tests and shows validation results on the command line. Also displays verbose logging messages.


### New project creation

`npx mct create`

Asks a series of questions and creates a new project based on those preferences.


## Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
56 changes: 56 additions & 0 deletions app/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,48 @@
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
{
"name": "cli (add)",
"cwd": "${workspaceRoot}/debugoutput/minecraft-gametests/",
"args": ["add", "-i", "../temp/test"],
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/src/cli/index.ts",
"preLaunchTask": "gulp: jsncorebuild",
"sourceMaps":true,
"runtimeExecutable": null,
"localRoot": "${workspaceRoot}/src",
"runtimeArgs": ["--nolazy"],
"outFiles": ["${workspaceFolder}/toolbuild/jsn/**/*.js"]
},
{
"name": "cli (info)",
"cwd": "${workspaceRoot}/debugoutput/gtbasicworld/",
"args": ["info"],
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/src/cli/index.ts",
"preLaunchTask": "gulp: jsncorebuild",
"sourceMaps": true,
"runtimeExecutable": null,
"localRoot": "${workspaceRoot}/src",
"runtimeArgs": ["--nolazy"],
"outFiles": ["${workspaceFolder}/toolbuild/jsn/**/*.js"]
},
{
"name": "cli (world)",
"cwd": "${workspaceRoot}/debugoutput/",
"args": ["world", "set", "-betaapis", "-o", "./worldtest/"],
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/src/cli/index.ts",
"preLaunchTask": "gulp: jsncorebuild",
"sourceMaps": true,
"runtimeExecutable": null,
"localRoot": "${workspaceRoot}/src",
"runtimeArgs": ["--nolazy"],
"outFiles": ["${workspaceFolder}/toolbuild/jsn/**/*.js"]
},
{
"name": "cli (val content1)",
"cwd": "${workspaceRoot}/../samplecontent/addon/build/content1/",
Expand Down Expand Up @@ -78,6 +120,20 @@
"runtimeArgs": ["--nolazy", "--max-old-space-size=32768"],
"outFiles": ["${workspaceFolder}/toolbuild/jsn/**/*.js"]
},
{
"name": "cli (create)",
"cwd": "${workspaceRoot}/",
"args": ["create", "-o", "debugoutput", "custom_name", "addonStarter", "custom_creator", "florid description"],
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/src/cli/index.ts",
"preLaunchTask": "gulp: jsncorebuild",
"sourceMaps":true,
"runtimeExecutable": null,
"localRoot": "${workspaceRoot}/src",
"runtimeArgs": ["--nolazy"],
"outFiles": ["${workspaceFolder}/toolbuild/jsn/**/*.js"]
},
{
"type": "node",
"request": "launch",
Expand Down
10 changes: 2 additions & 8 deletions app/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,10 @@ function runUpdateVersions() {
return gulp
.src(versionSource, { base: "" })
.pipe(
updateVersions([
"./package.json",
"./package-lock.json",
"./jsnode/package.json",
"./src/core/Constants.ts",
])
updateVersions(["./package.json", "./package-lock.json", "./jsnode/package.json", "./src/core/Constants.ts"])
);
}


function runDownloadSamples() {
return gulp.src(mcreslistsamplesigs, { base: "" }).pipe(downloadResources("public/res/samples/microsoft/"));
}
Expand All @@ -277,7 +271,7 @@ function runDownloadVanillaResources() {
gulp.task("jsnwebbuild", gulp.series("clean-jsnwebbuild", compileJsnWebBuild, "postclean-jsnwebbuild"));

gulp.task("clean-webbuild", function () {
return del(["web"]);
return del(["out/web"]);
});

gulp.task("clean-res", function () {
Expand Down
172 changes: 85 additions & 87 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading