diff --git a/packages/field-scripts/create-module/template/module.config.js b/packages/field-scripts/create-module/template/module.config.js new file mode 100644 index 00000000..8c17622b --- /dev/null +++ b/packages/field-scripts/create-module/template/module.config.js @@ -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', +}; diff --git a/packages/field-scripts/create-module/template/package.json b/packages/field-scripts/create-module/template/package.json new file mode 100644 index 00000000..8e327558 --- /dev/null +++ b/packages/field-scripts/create-module/template/package.json @@ -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 (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" +} diff --git a/packages/field-scripts/create-module/template/src/ObservationsContainer.vue b/packages/field-scripts/create-module/template/src/ObservationsContainer.vue new file mode 100644 index 00000000..6654e97e --- /dev/null +++ b/packages/field-scripts/create-module/template/src/ObservationsContainer.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/packages/field-scripts/create-module/template/src/ObservationsWidget.vue b/packages/field-scripts/create-module/template/src/ObservationsWidget.vue new file mode 100644 index 00000000..f071252f --- /dev/null +++ b/packages/field-scripts/create-module/template/src/ObservationsWidget.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/packages/field-scripts/create-module/template/src/routes.js b/packages/field-scripts/create-module/template/src/routes.js new file mode 100644 index 00000000..510b109e --- /dev/null +++ b/packages/field-scripts/create-module/template/src/routes.js @@ -0,0 +1,11 @@ +import ObservationsContainer from './ObservationsContainer.vue'; + +const routes = [ + { + path: '/observations', + name: 'observations', + component: ObservationsContainer, + }, +]; + +export default routes;