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
// preset/entry.ts | |
import '#internal/nitro/virtual/polyfill' | |
import { toNodeListener } from 'h3' | |
import { trapUnhandledNodeErrors } from './utils' | |
const nitroApp = useNitroApp() | |
export const listener = toNodeListener(nitroApp.h3App) |
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
// Get the imports | |
import { credential } from 'firebase-admin' | |
import { initializeApp } from 'firebase-admin/app' | |
import { getFirestore, CollectionReference, DocumentData } from 'firebase-admin/firestore' | |
// get the service account - IT SHOULD BE GIT IGNORED! | |
// Make one and download it here: | |
// https://console.firebase.google.com/u/0/project/your-project-name/settings/serviceaccounts/adminsdk | |
const serviceAccount = require('../../firebase-admin-service-account.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
<template> | |
<div id="header" :class="headerClasses" class="z-40 w-full"> | |
<div class="sticky top-0 inset-0 z-40"> | |
<div class="max-w-7xl mx-auto flex justify-between items-center px-4 py-5 sm:px-6 sm:py-4 lg:px-8 md:justify-start md:space-x-10"> | |
<div class="flex-1 flex flex-row items-center justify-between"> | |
<nav class="flex flex-col sm:flex-row sm:space-x-10"> | |
<a id="whyIsItNeeded" href="#joinTheMovement" v-smooth-scroll class="text-base font-medium"> | |
Why is it needed? | |
</a> | |
<a id="faqs" href="#questions" v-smooth-scroll class="text-base font-medium"> |
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
/** | |
* This Gist is part of a medium article - read here: | |
* https://jamiecurnow.medium.com/using-firestore-with-more-typescript-8058b6a88674 | |
*/ | |
// import firstore (obviously) | |
import { firestore } from 'firebase-admin' | |
import type { DocumentData, WithFieldValue } from 'firebase-admin/firestore' | |
// Here's the helper type for paths: |
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
/** | |
* This Gist is part of a medium article - read here: | |
* https://jamiecurnow.medium.com/using-firestore-with-typescript-65bd2a602945 | |
*/ | |
// import firstore (obviously) | |
import { firestore } from "firebase-admin" | |
// Import or define your types | |
// import { YourType } from '~/@types' |
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
/** | |
* This Gist is part of a medium article - read here: | |
* https://jamiecurnow.medium.com/using-firestore-with-typescript-65bd2a602945 | |
*/ | |
// import firstore (obviously) | |
import { firestore } from "firebase-admin" | |
// Import or define your types | |
// import { YourType } from '~/@types' |
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
build: { | |
extractCSS: false, | |
extend (config, {isDev}) { | |
if (isDev && process.client) { | |
config.module.rules.push({ | |
enforce: 'pre', | |
test: /\.(js|vue)$/, | |
loader: 'eslint-loader', | |
exclude: /(node_modules)/ | |
}) |
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
// NativeScript core theme | |
// @see https://docs.nativescript.org/ui/theme | |
@import '~nativescript-theme-core/scss/light'; | |
// Override variables here | |
@import '~nativescript-theme-core/scss/index'; | |
// Global SCSS styling | |
// @see https://docs.nativescript.org/ui/styling |
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
<template lang="html"> | |
<ScrollView> | |
<StackLayout width="100%"> | |
<Label class="drawer-header" text="Drawer"/> | |
<Label | |
v-for="(page, i) in pages" | |
@tap="goToPage(page.component)" | |
class="drawer-item" | |
:text="page.name" |
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
import Vue from 'nativescript-vue' | |
import routes from '~/router' | |
import store from '~/store' | |
import sideDrawer from '~/components/sideDrawer' | |
import drawerContent from '~/components/drawerContent' | |
// Prints Vue logs when --env.production is *NOT* set while building | |
Vue.config.silent = (TNS_ENV === 'production') | |
Vue.registerElement('RadSideDrawer', () => require('nativescript-ui-sidedrawer').RadSideDrawer) |
NewerOlder