Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-73 committed Mar 8, 2024
0 parents commit bf75648
Show file tree
Hide file tree
Showing 55 changed files with 20,096 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/essai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: ci:test
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
name: Continuous integration (tests)
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.9.0

- name: Checkout 🛎️
uses: actions/[email protected]

- name: Set $PATH 🪜
run: echo "$HOME/.meteor" >> $GITHUB_PATH
- name: essai
run: sudo apt-get install inotify-tools
- name: Watch
run: bash "$HOME/work/VueGPX/VueGPX/watch.sh" &
- name: Set env.METEOR_RELEASE 📻
run: echo "METEOR_RELEASE=$(cat .meteor/release | cut -d@ -f2)" >> $GITHUB_ENV

- name: Cache ~/.meteor (Meteor ${{ env.METEOR_RELEASE }}) 💿
uses: actions/[email protected]
id: cache-meteor
env:
cache-name: cache-meteor
with:
path: ~/.meteor
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ env.METEOR_RELEASE }}-${{ hashFiles('.meteor/release') }}-${{ hashFiles('.meteor/versions') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-${{ env.METEOR_RELEASE }}-${{ hashFiles('.meteor/release') }}-
${{ runner.os }}-test-${{ env.cache-name }}-${{ env.METEOR_RELEASE }}-
- name: Install Meteor ${{ env.METEOR_RELEASE }} ☄️
if: steps.cache-meteor.outputs.cache-hit != 'true'
run: curl https://install.meteor.com?release=${{ env.METEOR_RELEASE }} | sh

- name: Cache ~/.npm 📀
uses: actions/[email protected]
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Cache ./node_modules 💽
uses: actions/[email protected]
id: cache-node-modules
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Cache Cypress binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('**/package-lock.json') }}

- name: Cypress
uses: cypress-io/github-action@v6
with:
record: true
start: meteor npm start
wait-on: 'http://127.0.0.1:3000'
wait-on-timeout: 600
command: meteor npm test
# build: npx cypress info
env:
# pass the Cypress Cloud record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass the project ID from the secrets through environment variable
CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules/
.VSCodeCounter/
.meteor/local/
.cache/
.scannerwork/
.coverage/
.cypress-coverage
.vite-inspect/
.vscode/
.nyc_output/
settings-production.json
settings-development.json
mobile-config.js
19 changes: 19 additions & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
1 change: 1 addition & 0 deletions .meteor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local
7 changes: 7 additions & 0 deletions .meteor/.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
# - ensuring you don't accidentally deploy one app on top of another
# - providing package authors with aggregated statistics

ynjkvapwlqmn.oho93hivg92
23 changes: 23 additions & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
@@ -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.

[email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # The database Meteor supports right now
[email protected] # Reactive variable for tracker

[email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Enable TypeScript syntax in .ts and .tsx modules
[email protected] # Server-side component of the `meteor shell` command
[email protected] # Update client in development without reloading the page

[email protected] # Define static page content in .html files
jorgenvatle:[email protected]


2 changes: 2 additions & 0 deletions .meteor/platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server
browser
1 change: 1 addition & 0 deletions .meteor/release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
73 changes: 73 additions & 0 deletions .meteor/versions
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Meteor + Vue3 + Vite

This is a simple example of how to use Vue3 with Meteor.

## How to use

1. Clone this repo
2. Run `meteor npm install`
3. Run `meteor`
4. Open `http://localhost:3000` in your browser

## Libraries used

- [Vue3](https://v3.vuejs.org/)
- [Vite](https://vitejs.dev/)
- [Vue Router](https://next.router.vuejs.org/)
- [Meteor](https://www.meteor.com/)
- [Vue Meteor Tracker](https://github.com/meteor-vue/vue-meteor-tracker)
- [Tailwind CSS](https://tailwindcss.com/)
1 change: 1 addition & 0 deletions client/_vite-bundle/meteor-entry.js._vite-bundle.tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Stub file for Meteor-Vite
3 changes: 3 additions & 0 deletions client/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
9 changes: 9 additions & 0 deletions client/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<head>
<title>cypressActions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app"></div>
</body>
1 change: 1 addition & 0 deletions client/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// main entry point is in imports/ui/main.jsx
67 changes: 67 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
const { defineConfig } = require('cypress');
//const vitePreprocessor = require('cypress-vite');

// tests/cypress/plugins/seeder.js

const path = require('path');

const { Seeder } = require('mongo-seeding');
const config = {
database: 'mongodb://localhost:3001/meteor',
dropDatabase: true
};
const seeder = new Seeder(config);
const collections = seeder.readCollectionsFromPath(
path.resolve('./tests/cypress/data')
);

module.exports = defineConfig({
// setupNodeEvents can be defined in either
// the e2e or component configuration

pageLoadTimeout: 120000,
video: true,
fixturesFolder: 'tests/cypress/fixtures',
//
//pluginsFile: "tests/cypress/plugins/index.js",
screenshotsFolder: 'tests/cypress/screenshots',
//,
videosFolder: 'tests/cypress/videos',
//experimentalComponentTesting: true,

env: {
baseUrl: 'http://localhost:3000',
codeCoverage: {
url: 'http://localhost:3000/__coverage__'
}
},
e2e: {
supportFile: 'tests/cypress/support/index.js',
specPattern: 'tests/cypress/integration/*.spec.js',
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config);
on('task', {
async 'seed:database'() {
await seeder.import(collections);
// > If you do not need to return a value, explicitly return null to
// > signal that the given event has been handled.
return null;
}
});
// on('file:preprocessor', vitePreprocessor());
// on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'));
// `on` is used to hook into various events Cypress emits.
// `config` is the resolved Cypress config.
// require('./seeder')(on, config);
return config;
}
},
component: {
supportFile: 'tests/cypress/support/component.js',
indexHtmlFile: 'tests/cypress/support/component-index.html',
devServer: {
framework: 'vue',
bundler: 'vite'
}
}
});
10 changes: 10 additions & 0 deletions imports/api/links.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Meteor } from 'meteor/meteor'
import { Mongo } from 'meteor/mongo'

export const LinksCollection = new Mongo.Collection('links')

if (Meteor.isServer) {
Meteor.publish('links', function () {
return LinksCollection.find({})
})
}
5 changes: 5 additions & 0 deletions imports/ui/About.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<h1 class="text-3xl font-bold my-6">About Page</h1>

<p>This is the about page.</p>
</template>
10 changes: 10 additions & 0 deletions imports/ui/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup>
import AppMenu from './AppMenu.vue'
</script>

<template>
<div class="p-8">
<AppMenu />
<router-view />
</div>
</template>
6 changes: 6 additions & 0 deletions imports/ui/AppMenu.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<nav class="flex items-center">
<router-link :to="{ name: 'home' }" class="mr-4 text-green-700 hover:underline">Home</router-link>
<router-link :to="{ name: 'about' }" class="mr-4 text-green-700 hover:underline">About</router-link>
</nav>
</template>
16 changes: 16 additions & 0 deletions imports/ui/Hello.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script setup>
import { ref } from 'vue'
const count = ref(0)
function increment() {
count.value++
}
</script>

<template>
<button @click="increment" class="bg-green-700 hover:bg-green-900 text-white py-2 px-4 rounded">Click Me</button>
<p>
You've pressed the button <strong>{{ count }}</strong> times.
</p>
</template>
Loading

0 comments on commit bf75648

Please sign in to comment.