- remove all vue-2 references from Meteor

This commit is contained in:
denihs
2024-03-20 11:57:08 -04:00
parent 480936b699
commit 89434bb938
28 changed files with 1 additions and 365 deletions

View File

@@ -285,20 +285,6 @@ You can also use Vue 3 with Vite by using the [jorgenvatle:meteor-vite](https://
package. You can see an example on the [meteor-vite](https://github.com/JorgenVatle/meteor-vite/tree/release/examples/vue)
repository.
<h3 id="vue-2">--vue-2</h3>
The command `meteor create --vue-2 app-name` creates a Meteor app with [Vue 2](https://v2.vuejs.org/) and
[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the
[Vue 2 tutorial](https://vue-tutorial.meteor.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `vue`, `vue-meteor-tracker`.
Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`,
`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `tracker`, `static-html`, `akryum:vue-component`,
`meteortesting:mocha`, `johanbrook:publication-collector`.
<h2 id="meteorgenerate"> meteor generate </h2>
``meteor generate`` is a command for generating scaffolds for your current project. When ran without arguments, it will ask

View File

@@ -607,7 +607,6 @@ export const AVAILABLE_SKELETONS = [
DEFAULT_SKELETON,
"typescript",
"vue",
'vue-2',
"svelte",
"tailwind",
"chakra-ui",
@@ -623,7 +622,6 @@ const SKELETON_INFO = {
"react": "To create a basic React-based app",
"typescript": "To create an app using TypeScript and React",
"vue": "To create a basic Vue3-based app",
"vue-2": "To create a basic Vue2-based app",
"svelte": "To create a basic Svelte app",
"tailwind": "To create an app using React and Tailwind",
"chakra-ui": "To create an app Chakra UI and React",
@@ -644,7 +642,6 @@ main.registerCommand({
blaze: { type: Boolean },
react: { type: Boolean },
vue: { type: Boolean },
'vue-2': { type: Boolean },
typescript: { type: Boolean },
apollo: { type: Boolean },
svelte: { type: Boolean },

View File

@@ -1,5 +1,4 @@
export const EXAMPLE_REPOSITORIES = {
"vue-2": { "repo": "https://github.com/meteor/skel-vue-2" },
"vue": { "repo": "https://github.com/meteor/skel-vue" },
"react": { "repo": "https://github.com/meteor/skel-react" },
"full": { "repo": "https://github.com/meteor/skel-full" },

View File

@@ -152,7 +152,7 @@ Options:
>>> create
Create a new project.
Usage: meteor create [--release <release>] [--bare|--minimal|--full|--react|--vue|--vue-2|--apollo|--svelte|--blaze|--tailwind|--chakra-ui|--solid] <path>
Usage: meteor create [--release <release>] [--bare|--minimal|--full|--react|--vue|--apollo|--svelte|--blaze|--tailwind|--chakra-ui|--solid] <path>
meteor create [--release <release>] --example <example_name> [<path>]
meteor create [--release <release>] --from <git_url> [<path>]
meteor create --list
@@ -188,7 +188,6 @@ Options:
--full Create a fully scaffolded app.
--react Create a basic react-based app, same as default.
--vue Create a basic vue3-based app.
--vue-2 Create a basic vue2-based app.
--apollo Create a basic apollo-based app.
--svelte Create a basic svelte-based app.
--typescript Create a basic Typescript React-based app.

View File

@@ -44,10 +44,6 @@ Similar to `skel`, `skel-solid` is copied on `meteor create --solid` command.
Similar to `skel`, `skel-vue` is copied on `meteor create --vue` command.
## skel-vue-2 - Package Skeleton
Similar to `skel`, `skel-vue-2` is copied on `meteor create --vue-2` command.
## server - Bundled App's Bootstrap
The `server` folder is copied by Isobuild when the app is bundled (on

View File

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

View File

@@ -1 +0,0 @@
local

View File

@@ -1,24 +0,0 @@
# 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
tracker # Dependency tracker to allow reactive callbacks
static-html # Define static page content in .html files
akryum:vue-component # Vue-CLI template to publish components
meteortesting:mocha # A package for writing and running your meteor app and package tests with mocha
johanbrook:publication-collector # Test a Meteor publication by collecting its output

View File

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

View File

@@ -1,8 +0,0 @@
<head>
<title>~name~</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="app"></div>
</body>

View File

@@ -1,12 +0,0 @@
import Vue from 'vue'
import '../imports/ui/plugins'
import App from '../imports/ui/App.vue'
Meteor.startup(() => {
new Vue({
el: '#app',
...App,
})
})

View File

@@ -1,3 +0,0 @@
import { Mongo } from 'meteor/mongo';
export default new Mongo.Collection('links');

View File

@@ -1,24 +0,0 @@
// Tests for the behavior of the links collection
//
// https://guide.meteor.com/testing.html
import { Meteor } from 'meteor/meteor';
import { assert } from 'chai';
import Links from './Links.js';
if (Meteor.isServer) {
describe('links collection', function () {
it('insert correctly', function () {
const linkId = Links.insert({
title: 'meteor homepage',
url: 'https://www.meteor.com',
});
const added = Links.find({ _id: linkId });
const collectionName = added._getCollectionName();
const count = added.count();
assert.equal(collectionName, 'links');
assert.equal(count, 1);
});
});
}

View File

@@ -1,31 +0,0 @@
import { Meteor } from 'meteor/meteor';
import Links from './collections/Links.js';
async function insertLink({ title, url }) {
await Links.insertAsync({ title, url, createdAt: new Date() });
}
Meteor.startup(async () => {
// If the Links collection is empty, add some data.
if (await Links.find().countAsync() === 0) {
await insertLink({
title: 'Do the Tutorial',
url: 'https://vue-tutorial.meteor.com/',
});
await insertLink({
title: 'Follow the Guide',
url: 'https://guide.meteor.com',
});
await insertLink({
title: 'Read the Docs',
url: 'https://docs.meteor.com',
});
await insertLink({
title: 'Discussions',
url: 'https://forums.meteor.com',
});
}
});

View File

@@ -1,16 +0,0 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import Links from '../collections/Links.js';
Meteor.methods({
'createLink'(title, url) {
check(url, String);
check(title, String);
return Links.insert({
url,
title,
createdAt: new Date(),
});
},
});

View File

@@ -1,20 +0,0 @@
import { Meteor } from 'meteor/meteor';
import { assert } from 'chai';
import Links from '../collections/Links.js';
import './methods.js';
if (Meteor.isServer) {
describe('method: createLink', function () {
beforeEach(function () {
Links.remove({});
});
it('can add a new link', function () {
const addLink = Meteor.server.method_handlers['createLink'];
addLink.apply({}, ['meteor.com', 'https://www.meteor.com']);
assert.equal(Links.find().count(), 1);
});
});
}

View File

@@ -1 +0,0 @@
import './createLink'

View File

@@ -1 +0,0 @@
import './links'

View File

@@ -1,6 +0,0 @@
import { Meteor } from 'meteor/meteor';
import Links from '../collections/Links.js';
Meteor.publish('links', function () {
return Links.find();
});

View File

@@ -1,22 +0,0 @@
import { assert } from 'chai'
import { PublicationCollector } from 'meteor/johanbrook:publication-collector'
import Links from '../collections/Links.js'
import './publications.js'
describe('Publish links', function () {
beforeEach(function () {
Links.remove({})
Links.insert({
title: 'meteor homepage',
url: 'https://www.meteor.com'
})
})
it('sends all links', function (done) {
const collector = new PublicationCollector()
collector.collect('links', (collections) => {
assert.equal(collections.links.length, 1)
done()
})
})
})

View File

@@ -1,26 +0,0 @@
<template>
<div>
<h1>Welcome to Meteor!</h1>
<hello/>
<info/>
</div>
</template>
<script>
import Hello from './components/Hello.vue'
import Info from './components/Info.vue'
export default {
components: {
Hello,
Info,
},
}
</script>
<style>
body {
font-family: sans-serif;
padding: 10px;
}
</style>

View File

@@ -1,27 +0,0 @@
<template>
<div>
<button @click="increment">Click Me</button>
<p>You've pressed the button {{counter}} times.</p>
</div>
</template>
<script>
export default {
data() {
return {
counter: 0,
}
},
methods: {
increment() {
this.counter += 1
}
},
}
</script>
<style scoped>
p {
font-family: serif;
}
</style>

View File

@@ -1,59 +0,0 @@
<template>
<div>
<h2>Learn Meteor!</h2>
<ul>
<li>
<form class="info-link-add">
<input type="text" v-model="title" name="title" placeholder="Title" required>
<input type="url" v-model="url" name="url" placeholder="Url" required>
<input type="submit" name="submit" @click="submit($event)" value="Add new link">
</form>
</li>
<li v-for="link in links" v-bind:key="link._id">
<a :href="link.url" target="_blank">{{ link.title }}</a>
</li>
</ul>
</div>
</template>
<script>
import Links from '../../api/collections/Links'
import { subscribe, autorun } from "vue-meteor-tracker";
export default {
data() {
return {
title: "",
url: "",
links: []
}
},
methods: {
submit(event) {
event.preventDefault()
Meteor.call('createLink', this.title, this.url, (error) => {
if (error) {
alert(error.error)
} else {
this.title = ''
this.url = ''
}
})
},
},
mounted() {
subscribe('links')
autorun(() => {
this.links = Links.find().fetch()
})
}
}
</script>
<style scoped>
ul {
font-family: monospace;
}
</style>

View File

@@ -1,4 +0,0 @@
import Vue from 'vue'
import VueMeteorTracker from 'vue-meteor-tracker'
Vue.use(VueMeteorTracker)

View File

@@ -1,23 +0,0 @@
{
"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.23.5",
"meteor-node-stubs": "^1.2.7",
"vue": "^2.7.15",
"vue-meteor-tracker": "^3.0.0-beta.7"
},
"meteor": {
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
},
"testModule": "tests/main.js"
}
}

View File

@@ -1,3 +0,0 @@
import '../imports/api/fixtures'
import '../imports/api/methods'
import '../imports/api/publications'

View File

@@ -1,20 +0,0 @@
import assert from "assert";
describe("skel", function () {
it("package.json has correct name", async function () {
const { name } = await import("../package.json");
assert.strictEqual(name, "skel");
});
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);
});
}
});

View File

@@ -277,13 +277,6 @@ You can also use Vue 3 with Vite by using the [jorgenvatle:meteor-vite](https://
package. You can see an example on the [meteor-vite](https://github.com/JorgenVatle/meteor-vite/tree/release/examples/vue)
repository.
## --vue-2 {vue-2}
The command `meteor create --vue-2 app-name` creates a Meteor app with [Vue 2](https://v2.vuejs.org/) and
[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the
[Vue 2 tutorial](https://vue-tutorial.meteor.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `vue`, `vue-meteor-tracker`.
Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`,