changing Vue tutorial link to the website with the new version

This commit is contained in:
denyhs
2021-04-08 15:55:47 -04:00
parent c59bbe0de1
commit 558167666a
13 changed files with 123 additions and 2 deletions

View File

@@ -514,7 +514,8 @@ const AVAILABLE_SKELETONS = [
"minimal",
DEFAULT_SKELETON,
"typescript",
"vue"
"vue",
"svelte"
];
main.registerCommand({
@@ -532,6 +533,7 @@ main.registerCommand({
vue: { type: Boolean },
typescript: { type: Boolean },
apollo: { type: Boolean },
svelte: { type: Boolean },
},
catalogRefresh: new catalog.Refresh.Never()
}, function (options) {
@@ -901,6 +903,7 @@ main.registerCommand({
cmd("meteor create --react # to create a basic React-based app");
cmd("meteor create --vue # to create a basic Vue-based app");
cmd("meteor create --apollo # to create a basic Apollo + React app");
cmd("meteor create --svelte # to create a basic Svelte app");
cmd("meteor create --typescript # to create an app using TypeScript and React");
cmd("meteor create --blaze # to create an app using Blaze");
}

View File

@@ -150,7 +150,7 @@ Options:
>>> create
Create a new project.
Usage: meteor create [--release <release>] [--bare|--minimal|--full|--react|--vue|--apollo|--blaze] <path>
Usage: meteor create [--release <release>] [--bare|--minimal|--full|--react|--vue|--apollo|--svelte|--blaze] <path>
meteor create [--release <release>] --example <example_name> [<path>]
meteor create --list
meteor create --package [<package_name>]
@@ -185,6 +185,7 @@ Options:
--react Create a basic react-based app, same as default.
--vue Create a basic vue-based app.
--apollo Create a basic apollo-based app.
--svelte Create a basic svelte-based app.
--typescript Create a basic Typescript React-based app.
--blaze Create a basic blaze-based app.

View File

@@ -0,0 +1 @@
node_modules/

View File

@@ -0,0 +1 @@
local

View File

@@ -0,0 +1,23 @@
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
reactive-var # Reactive variable for tracker
standard-minifier-css # CSS minifier run for production mode
standard-minifier-js # JS minifier run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers
ecmascript # Enable ECMAScript2015+ syntax in app code
typescript # Enable TypeScript syntax in .ts and .tsx modules
shell-server # Server-side component of the `meteor shell` command
autopublish # Publish all data to the clients (for prototyping)
insecure # Allow all DB writes from clients (for prototyping)
static-html # Define static page content in .html files
svelte:compiler # Meteor package to allow us to create files with the .svelte extension
rdb:svelte-meteor-data # Meteor package which allows us to consume Meteor's reactive data sources inside of our Svelte components

View File

@@ -0,0 +1,2 @@
server
browser

View File

@@ -0,0 +1,4 @@
body {
padding: 10px;
font-family: sans-serif;
}

View File

@@ -0,0 +1,8 @@
<head>
<title>~name~</title>
</head>
<body>
<div id="app"></div>
</body>

View File

@@ -0,0 +1,9 @@
import { Meteor } from 'meteor/meteor';
import App from '../imports/ui/App.svelte';
Meteor.startup(() => {
new App({
target: document.getElementById('app')
});
});

View File

@@ -0,0 +1,22 @@
<script>
let counter = 0;
const addToCounter = () => {
counter += 1;
}
</script>
<div class="container">
<h1>Welcome to Meteor!</h1>
<button on:click={addToCounter}>Click Me</button>
<p>You've pressed the button {counter} times.</p>
<h2>Learn Meteor!</h2>
<ul>
<li><a href="https://svelte-tutorial.meteor.com" target="_blank">Do the Tutorial</a></li>
<li><a href="http://guide.meteor.com" target="_blank">Follow the Guide</a></li>
<li><a href="https://docs.meteor.com" target="_blank">Read the Docs</a></li>
<li><a href="https://forums.meteor.com" target="_blank">Discussions</a></li>
</ul>
</div>

View File

@@ -0,0 +1,22 @@
{
"name": "~name~",
"private": true,
"scripts": {
"start": "meteor run",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@babel/runtime": "^7.11.2",
"meteor-node-stubs": "^1.0.1",
"svelte": "^3.37.0"
},
"meteor": {
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
},
"testModule": "tests/main.js"
}
}

View File

@@ -0,0 +1,5 @@
import { Meteor } from 'meteor/meteor';
Meteor.startup(() => {
// code to run on server at startup
});

View File

@@ -0,0 +1,20 @@
import assert from "assert";
describe("~name~", function () {
it("package.json has correct name", async function () {
const { name } = await import("../package.json");
assert.strictEqual(name, "~name~");
});
if (Meteor.isClient) {
it("client is not server", function () {
assert.strictEqual(Meteor.isServer, false);
});
}
if (Meteor.isServer) {
it("server is not client", function () {
assert.strictEqual(Meteor.isClient, false);
});
}
});