diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..a3c1aaa --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +static/sw.js diff --git a/.eslintrc.js b/.eslintrc.js index c2607a8..5de6d37 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,7 @@ module.exports = { }, extends: [ '@nuxtjs/eslint-config-typescript', - 'plugin:nuxt/recommended' + 'plugin:vue/recommended' ], plugins: [ ], diff --git a/app.js b/app.js index 86367fd..136060d 100644 --- a/app.js +++ b/app.js @@ -16,7 +16,7 @@ const app = express() const nuxt = new Nuxt({ ...config, dev: false, - _start: true, + _start: true }) // app.use(async (req, res, next) => { @@ -50,6 +50,7 @@ app.use(async (req, res) => { } nuxt.render(req, res) }) +// eslint-disable-next-line no-void const server = createServer(app, void 0, [ 'application/javascript', 'application/json', @@ -72,7 +73,7 @@ const server = createServer(app, void 0, [ 'text/text', 'text/xml', 'application/rss+xml', - 'application/atom+xml', + 'application/atom+xml' ]) module.exports.handler = (event, ctx) => { diff --git a/buildspec.yml b/buildspec.yml index cf22fc2..2892a8e 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -12,10 +12,11 @@ phases: - npm run lint # TODO: uncomment if there are integration or unit tests to run # - npm test - - npm run sls -- deploy --stage dev --noDeploy + - npm run sls -- deploy --stage $sls_stage --noDeploy build: commands: - - npm run sls -- deploy --stage dev + - npm run build + - npm run sls -- deploy --stage $sls_stage post_build: commands: - cat ./.serverless/serverless-state.json diff --git a/components/AboutCardComp.vue b/components/AboutCardComp.vue index fd62499..4501840 100644 --- a/components/AboutCardComp.vue +++ b/components/AboutCardComp.vue @@ -8,9 +8,9 @@ - {{ this.card.title }} + {{ card.title }} - {{ this.card.subtitle }} + {{ card.subtitle }}
- +
diff --git a/components/FluidMarginContainer.vue b/components/FluidMarginContainer.vue index 9207951..a086712 100644 --- a/components/FluidMarginContainer.vue +++ b/components/FluidMarginContainer.vue @@ -17,7 +17,7 @@ - + diff --git a/components/SkillCardComp.vue b/components/SkillCardComp.vue index 29de156..cab4156 100644 --- a/components/SkillCardComp.vue +++ b/components/SkillCardComp.vue @@ -1,3 +1,4 @@ +/* eslint-disable vue/no-v-html */ diff --git a/pages/contact.vue b/pages/contact.vue index f02e136..35a9c4e 100644 --- a/pages/contact.vue +++ b/pages/contact.vue @@ -9,7 +9,7 @@ text elevation="2" > - You've copied my Discord username {{ this.discordUsr }}! + You've copied my Discord username {{ discordUsr }}! mdi-email Say Hello! + > + mdi-email Say Hello! +

@@ -64,21 +66,21 @@ href="https://github.com/JacobAnavisca" icon > - mdi-github + mdi-github - mdi-telegram + mdi-telegram - mdi-discord + mdi-discord

Skills

@@ -35,8 +35,8 @@ cols="12" > @@ -62,8 +62,8 @@ export default class Skills extends Vue { skillItems: SkillsItem[] = [] - mounted() { - this.skillItems = skillStore.skillItems + mounted () { + this.skillItems = skillStore.skillItems } } diff --git a/pages/work.vue b/pages/work.vue index 35e4d9f..90f871b 100644 --- a/pages/work.vue +++ b/pages/work.vue @@ -1,7 +1,7 @@ @@ -22,8 +22,8 @@ import { workStore } from '~/store' export default class Work extends Vue { workCards: WorkCard[] = [] - mounted() { - this.workCards = workStore.workCards + mounted () { + this.workCards = workStore.workCards } } diff --git a/plugins/helpers.ts b/plugins/helpers.ts index 91780d3..dee4e6b 100644 --- a/plugins/helpers.ts +++ b/plugins/helpers.ts @@ -22,7 +22,7 @@ declare module 'vuex/types/index' { } } -const logger: Plugin = ({$vuetify}, inject) => { +const logger: Plugin = ({ $vuetify }, inject) => { inject('contentTopMargin', (): number => { const margin = $vuetify.breakpoint.mdAndDown ? 0 diff --git a/plugins/logger.ts b/plugins/logger.ts index 32621ef..4e181ad 100644 --- a/plugins/logger.ts +++ b/plugins/logger.ts @@ -27,7 +27,7 @@ declare module 'vuex/types/index' { } } -const logger: Plugin = (context, inject) => { +const logger: Plugin = (_context, inject) => { inject('log', { info: (message: string) => debug('PORTFOLIO::DEBUG')(message), error: (message: string) => debug('PORTFOLIO::ERROR')(message) diff --git a/plugins/plugins-accessor.ts b/plugins/plugins-accessor.ts index 1d3e113..7b6c22f 100644 --- a/plugins/plugins-accessor.ts +++ b/plugins/plugins-accessor.ts @@ -1,8 +1,9 @@ +/* eslint-disable no-unused-expressions */ import { Plugin } from '@nuxt/types' import { initializeAxios, initializeLog } from '~/utils/pluginsInitializer' const accessor: Plugin = ({ $axios, $log }) => { - initializeAxios($axios), + initializeAxios($axios) initializeLog($log) } diff --git a/serverless.yml b/serverless.yml index f3d11e0..9ccdb61 100644 --- a/serverless.yml +++ b/serverless.yml @@ -33,6 +33,11 @@ functions: - http: ANY / - http: ANY /{proxy+} +package: + include: + - .nuxt/** + - node_modules/tslib/** + custom: domainName: dev: beta.jacobanavisca.com diff --git a/static/README.md b/static/README.md deleted file mode 100644 index cf00435..0000000 --- a/static/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# STATIC - -**This directory is not required, you can delete it if you don't want to use it.** - -This directory contains your static files. -Each file inside this directory is mapped to `/`. -Thus you'd want to delete this README.md before deploying to production. - -Example: `/static/robots.txt` is mapped as `/robots.txt`. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static). diff --git a/static/v.png b/static/v.png deleted file mode 100644 index a2ce235..0000000 Binary files a/static/v.png and /dev/null differ diff --git a/static/vuetify-logo.svg b/static/vuetify-logo.svg deleted file mode 100644 index 145b6d1..0000000 --- a/static/vuetify-logo.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 46 diff --git a/store/index.ts b/store/index.ts index 306ee65..d0d72db 100644 --- a/store/index.ts +++ b/store/index.ts @@ -1,7 +1,7 @@ import { ActionTree, Store } from 'vuex' -import Vue from 'vue' +// import Vue from 'vue' import { RootState } from '@/types' -import { IncomingMessage } from 'connect' +// import { IncomingMessage } from 'connect' import { initialiseStores, @@ -14,13 +14,13 @@ const initializer = (store: Store) => initialiseStores(store) export const plugins = [initializer] export const actions: ActionTree = { - async nuxtServerInit(_context, server: { req: IncomingMessage; app: Vue }) { + async nuxtServerInit (_context) { //, server: { req: IncomingMessage; app: Vue } await Promise.all([ - skillStore.serverInit(server), - workStore.serverInit(server), - aboutStore.serverInit(server) + skillStore.serverInit(), + workStore.serverInit(), + aboutStore.serverInit() ]) - }, + } // async nuxtClientInit(context) { // await skillStore.clientInit() diff --git a/store/modules/AboutStoreModule.ts b/store/modules/AboutStoreModule.ts index a8003a9..d06c0a3 100644 --- a/store/modules/AboutStoreModule.ts +++ b/store/modules/AboutStoreModule.ts @@ -1,35 +1,35 @@ import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators' -import { IncomingMessage } from 'connect' +// import { IncomingMessage } from 'connect' import { AboutCard } from '@/types' import { $axios, $log } from '~/utils/pluginsInitializer' @Module({ name: 'modules/AboutStoreModule', namespaced: true, - stateFactory: true, + stateFactory: true }) export default class AboutStoreModule extends VuexModule { public aboutCards: AboutCard[] = [] @Mutation - private setAboutCard(val: AboutCard[]) { + private setAboutCard (val: AboutCard[]) { this.aboutCards = val } @Action - async serverInit(server: { req: IncomingMessage; app: Vue }) { + async serverInit () { // server: { req: IncomingMessage; app: Vue } try { $axios.setHeader('Content-Type', 'application/json') $axios.setHeader('x-api-key', process.env.APPSYNC_API_KEY) $log.info('Making request for about data') const aboutCards = (await $axios.$post('https://iwp2lauwg5e3dlespaft2ebjpq.appsync-api.us-west-2.amazonaws.com/graphql', { - query: "query listAboutards {\n listAboutCards {\n items {\n id\n title\n src\n content\n contentType\n subtitle\n width\n height\n }\n }\n}\n", + query: 'query listAboutards {\n listAboutCards {\n items {\n id\n title\n src\n content\n contentType\n subtitle\n width\n height\n }\n }\n}\n', variables: {} })).data.listAboutCards.items this.setAboutCard(aboutCards) - } catch(error) { + } catch (error) { $log.error(error) } } diff --git a/store/modules/MainStoreModule.ts b/store/modules/MainStoreModule.ts index e32dee1..1a585b5 100644 --- a/store/modules/MainStoreModule.ts +++ b/store/modules/MainStoreModule.ts @@ -3,19 +3,19 @@ import { Module, VuexModule, Mutation } from 'vuex-module-decorators' @Module({ name: 'modules/MainStoreModule', namespaced: true, - stateFactory: true, + stateFactory: true }) export default class MainStoreModule extends VuexModule { public showErrorAlert: boolean = false public showSuccessAlert: boolean = false @Mutation - public setErrorAlert(val: boolean) { + public setErrorAlert (val: boolean) { this.showErrorAlert = val } @Mutation - public setSuccessAlert(val: boolean) { + public setSuccessAlert (val: boolean) { this.showSuccessAlert = val } } diff --git a/store/modules/SkillsStoreModule.ts b/store/modules/SkillsStoreModule.ts index d762a7c..c2cd8c1 100644 --- a/store/modules/SkillsStoreModule.ts +++ b/store/modules/SkillsStoreModule.ts @@ -1,35 +1,35 @@ import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators' -import { IncomingMessage } from 'connect' +// import { IncomingMessage } from 'connect' import { SkillsItem } from '@/types' import { $axios, $log } from '~/utils/pluginsInitializer' @Module({ name: 'modules/SkillsStoreModule', namespaced: true, - stateFactory: true, + stateFactory: true }) export default class SkillsStoreModule extends VuexModule { public skillItems: SkillsItem[] = [] @Mutation - private setSkillItems(val: SkillsItem[]) { + private setSkillItems (val: SkillsItem[]) { this.skillItems = val } @Action - async serverInit(server: { req: IncomingMessage; app: Vue }) { + async serverInit () { // server: { req: IncomingMessage; app: Vue } try { $axios.setHeader('Content-Type', 'application/json') $axios.setHeader('x-api-key', process.env.APPSYNC_API_KEY) $log.info('Making request for skills data') const skillItems = (await $axios.$post('https://iwp2lauwg5e3dlespaft2ebjpq.appsync-api.us-west-2.amazonaws.com/graphql', { - query: "query MyQuery {\n listSkillItems(limit: 100) {\n items {\n categories\n id\n title\n }\n }\n}", + query: 'query MyQuery {\n listSkillItems(limit: 100) {\n items {\n categories\n id\n title\n }\n }\n}', variables: {} })).data.listSkillItems.items this.setSkillItems(skillItems) - } catch(error) { + } catch (error) { $log.error(error) } } diff --git a/store/modules/WorkStoreModule.ts b/store/modules/WorkStoreModule.ts index 1452e80..e13dfa2 100644 --- a/store/modules/WorkStoreModule.ts +++ b/store/modules/WorkStoreModule.ts @@ -1,35 +1,35 @@ import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators' -import { IncomingMessage } from 'connect' +// import { IncomingMessage } from 'connect' import { WorkCard } from '@/types' import { $axios, $log } from '~/utils/pluginsInitializer' @Module({ name: 'modules/WorkStoreModule', namespaced: true, - stateFactory: true, + stateFactory: true }) export default class WorkStoreModule extends VuexModule { public workCards: WorkCard[] = [] @Mutation - private setWorkCards(val: WorkCard[]) { + private setWorkCards (val: WorkCard[]) { this.workCards = val } @Action - async serverInit(server: { req: IncomingMessage; app: Vue }) { + async serverInit () { // server: { req: IncomingMessage; app: Vue } try { $axios.setHeader('Content-Type', 'application/json') $axios.setHeader('x-api-key', process.env.APPSYNC_API_KEY) $log.info('Making request for work data') const workCards = (await $axios.$post('https://iwp2lauwg5e3dlespaft2ebjpq.appsync-api.us-west-2.amazonaws.com/graphql', { - query: "query listWorkCards {\n listWorkCards {\n items {\n id\n title\n src\n description\n link\n }\n }\n}\n", + query: 'query listWorkCards {\n listWorkCards {\n items {\n id\n title\n src\n description\n link\n }\n }\n}\n', variables: {} })).data.listWorkCards.items this.setWorkCards(workCards) - } catch(error) { + } catch (error) { $log.error(error) } } diff --git a/tsconfig.json b/tsconfig.json index 180affb..cc7d629 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,7 +25,6 @@ ] }, "types": [ - "@nuxt/http", "@nuxtjs/axios", "@types/debug", "@types/node", diff --git a/utils/pluginsInitializer.ts b/utils/pluginsInitializer.ts index d33d16d..21a08d6 100644 --- a/utils/pluginsInitializer.ts +++ b/utils/pluginsInitializer.ts @@ -1,14 +1,15 @@ +/* eslint-disable import/no-mutable-exports */ import { NuxtAxiosInstance } from '@nuxtjs/axios' import { Log } from '@/plugins/logger' let $axios: NuxtAxiosInstance let $log: Log -export function initializeAxios(axiosInstance: NuxtAxiosInstance) { +export function initializeAxios (axiosInstance: NuxtAxiosInstance) { $axios = axiosInstance } -export function initializeLog(logInstance: Log) { +export function initializeLog (logInstance: Log) { $log = logInstance } diff --git a/utils/store-accessor.ts b/utils/store-accessor.ts index 0000d61..1a992e2 100644 --- a/utils/store-accessor.ts +++ b/utils/store-accessor.ts @@ -1,3 +1,4 @@ +/* eslint-disable import/no-mutable-exports */ import { Store } from 'vuex' import { getModule } from 'vuex-module-decorators' import SkillStore from '~/store/modules/SkillsStoreModule' @@ -10,7 +11,7 @@ let workStore: WorkStore let aboutStore: AboutStore let mainStore: MainStore -function initialiseStores(store: Store): void { +function initialiseStores (store: Store): void { skillStore = getModule(SkillStore, store) workStore = getModule(WorkStore, store) aboutStore = getModule(AboutStore, store)