-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy fm-obs as template for create-module script.
- Loading branch information
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
packages/field-scripts/create-module/template/module.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
31
packages/field-scripts/create-module/template/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/field-scripts/create-module/template/src/ObservationsContainer.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
14 changes: 14 additions & 0 deletions
14
packages/field-scripts/create-module/template/src/ObservationsWidget.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
11
packages/field-scripts/create-module/template/src/routes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |