diff --git a/apps/frontend-vue/.babelrc b/apps/frontend-vue/.babelrc new file mode 100644 index 0000000..84c2e57 --- /dev/null +++ b/apps/frontend-vue/.babelrc @@ -0,0 +1,16 @@ +{ + "env": { + "test": { + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": "current" + } + } + ] + ] + } + } +} diff --git a/apps/frontend-vue/.editorconfig b/apps/frontend-vue/.editorconfig new file mode 100644 index 0000000..5d12634 --- /dev/null +++ b/apps/frontend-vue/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/apps/frontend-vue/.eslintrc.js b/apps/frontend-vue/.eslintrc.js new file mode 100644 index 0000000..9cb2a23 --- /dev/null +++ b/apps/frontend-vue/.eslintrc.js @@ -0,0 +1,15 @@ +module.exports = { + root: true, + env: { + browser: true, + node: true, + }, + extends: [ + '@nuxtjs/eslint-config-typescript', + 'plugin:prettier/recommended', + 'plugin:nuxt/recommended', + ], + plugins: [], + // add your custom rules here + rules: {}, +} diff --git a/apps/frontend-vue/.gitignore b/apps/frontend-vue/.gitignore new file mode 100644 index 0000000..e8f682b --- /dev/null +++ b/apps/frontend-vue/.gitignore @@ -0,0 +1,90 @@ +# Created by .ignore support plugin (hsz.mobi) +### Node template +# Logs +/logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# Nuxt generate +dist + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# IDE / Editor +.idea + +# Service worker +sw.* + +# macOS +.DS_Store + +# Vim swap files +*.swp diff --git a/apps/frontend-vue/.prettierrc b/apps/frontend-vue/.prettierrc new file mode 100644 index 0000000..b2095be --- /dev/null +++ b/apps/frontend-vue/.prettierrc @@ -0,0 +1,4 @@ +{ + "semi": false, + "singleQuote": true +} diff --git a/apps/frontend-vue/README.md b/apps/frontend-vue/README.md new file mode 100644 index 0000000..da6a13d --- /dev/null +++ b/apps/frontend-vue/README.md @@ -0,0 +1,20 @@ +# @effect-ts-demo/todo-frontend-vue + +## Build Setup + +```bash +# install dependencies +$ yarn install + +# serve with hot reload at localhost:3000 +$ yarn dev + +# build for production and launch server +$ yarn build +$ yarn start + +# generate static project +$ yarn generate +``` + +For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). diff --git a/apps/frontend-vue/assets/README.md b/apps/frontend-vue/assets/README.md new file mode 100644 index 0000000..34766f9 --- /dev/null +++ b/apps/frontend-vue/assets/README.md @@ -0,0 +1,7 @@ +# ASSETS + +**This directory is not required, you can delete it if you don't want to use it.** + +This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked). diff --git a/apps/frontend-vue/components/Logo.vue b/apps/frontend-vue/components/Logo.vue new file mode 100644 index 0000000..bf7c01a --- /dev/null +++ b/apps/frontend-vue/components/Logo.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/apps/frontend-vue/components/README.md b/apps/frontend-vue/components/README.md new file mode 100644 index 0000000..a079f10 --- /dev/null +++ b/apps/frontend-vue/components/README.md @@ -0,0 +1,7 @@ +# COMPONENTS + +**This directory is not required, you can delete it if you don't want to use it.** + +The components directory contains your Vue.js Components. + +_Nuxt.js doesn't supercharge these components._ diff --git a/apps/frontend-vue/context.ts b/apps/frontend-vue/context.ts new file mode 100644 index 0000000..42a9ad9 --- /dev/null +++ b/apps/frontend-vue/context.ts @@ -0,0 +1,56 @@ +import * as T from '@effect-ts/core/Effect' +import { pretty } from '@effect-ts/core/Effect/Cause' +import { pipe, flow } from '@effect-ts/core/Function' +import * as L from '@effect-ts/core/Effect/Layer' +import { ApiConfig } from '@effect-ts-demo/todo-client' +import * as TodoClient from '@effect-ts-demo/todo-client' + +const config = Object.freeze({ + apiUrl: 'http://localhost:3330', // '/api' +}) + +function makeLayers(config: ApiConfig) { + return TodoClient.LiveApiConfig(config) +} +type GetProvider
= P extends L.Layer
+
+