Skip to content

Commit

Permalink
Copy fm-obs as template for create-module script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaehring committed Jul 11, 2023
1 parent 8b0de31 commit 988da0c
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
name: 'observations',
label: 'Observations',
description: 'Take photos and quick notes from the farm.',
widget: './src/ObservationsWidget.vue',
routes: './src/routes',
};
31 changes: 31 additions & 0 deletions packages/field-scripts/create-module/template/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "field-module-observations",
"version": "2.0.0-alpha.1",
"description": "Take photos and quick notes from the farm.",
"main": "module.config.js",
"type": "module",
"scripts": {
"start": "npm run dev",
"dev": "field-scripts develop-module",
"build": "field-scripts build-module --config module.config.js",
"preview": "vite preview",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/farmOS/field-kit.git"
},
"keywords": [
"farmOS"
],
"author": "Jamie Gaehring <gaehj457@gmail.com> (https://jgaehring.com)",
"license": "GPL-3.0-or-later",
"dependencies": {},
"devDependencies": {
"field-scripts": "2.0.0-alpha.1"
},
"bugs": {
"url": "https://github.com/farmOS/field-kit/issues"
},
"homepage": "https://github.com/farmOS/field-kit#readme"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<div></div>
</template>

<script>
export default {
name: 'ObservationsContainer',
setup() {},
};
</script>

<style>
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<div></div>
</template>

<script>
export default {
name: 'ObservationsWidget',
setup() {},
};
</script>

<style>
</style>
11 changes: 11 additions & 0 deletions packages/field-scripts/create-module/template/src/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ObservationsContainer from './ObservationsContainer.vue';

const routes = [
{
path: '/observations',
name: 'observations',
component: ObservationsContainer,
},
];

export default routes;

0 comments on commit 988da0c

Please sign in to comment.