2019-08-24 03:06:57 +00:00
|
|
|
// Some helpful application constants.
|
|
|
|
|
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
2019-08-24 17:01:57 +00:00
|
|
|
export const meta = {
|
2019-08-24 03:06:57 +00:00
|
|
|
name: "Postwoman",
|
2019-08-26 09:55:11 +00:00
|
|
|
shortDescription: "API request builder",
|
2019-11-28 15:11:52 +00:00
|
|
|
description:
|
|
|
|
|
"The Postwoman API request builder helps you create your requests faster, saving you precious time on your development."
|
2019-08-24 03:06:57 +00:00
|
|
|
};
|
2019-08-24 16:20:19 +00:00
|
|
|
// Sets the base path for the router.
|
|
|
|
|
// Important for deploying to GitHub pages.
|
|
|
|
|
// -- Travis includes the author in the repo slug,
|
|
|
|
|
// so if there's a /, we need to get everything after it.
|
2019-11-28 15:11:52 +00:00
|
|
|
let repoName = (process.env.TRAVIS_REPO_SLUG || "").split("/").pop();
|
|
|
|
|
export const routerBase =
|
|
|
|
|
process.env.DEPLOY_ENV === "GH_PAGES"
|
|
|
|
|
? {
|
|
|
|
|
router: {
|
|
|
|
|
base: `/${repoName}/`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
: {
|
|
|
|
|
router: {
|
|
|
|
|
base: "/"
|
|
|
|
|
}
|
|
|
|
|
};
|
2019-08-24 03:06:57 +00:00
|
|
|
export default {
|
2019-11-28 15:11:52 +00:00
|
|
|
mode: "spa",
|
2019-08-24 03:06:57 +00:00
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Headers of the page
|
|
|
|
|
*/
|
2019-09-25 00:52:25 +00:00
|
|
|
server: {
|
2019-11-28 15:11:52 +00:00
|
|
|
host: "0.0.0.0" // default: localhost
|
2019-09-25 00:52:25 +00:00
|
|
|
},
|
2019-12-05 00:47:41 +00:00
|
|
|
render: {
|
|
|
|
|
bundleRenderer: {
|
|
|
|
|
shouldPreload: (file, type) => {
|
2019-12-08 17:08:32 +00:00
|
|
|
return ["script", "style", "font"].includes(type);
|
2019-12-05 00:47:41 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
head: {
|
|
|
|
|
title: `${meta.name} \u2022 ${meta.shortDescription}`,
|
2019-11-28 15:11:52 +00:00
|
|
|
meta: [
|
|
|
|
|
{
|
|
|
|
|
charset: "utf-8"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "viewport",
|
|
|
|
|
content:
|
|
|
|
|
"width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover, minimal-ui"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
hid: "description",
|
|
|
|
|
name: "description",
|
|
|
|
|
content: meta.description || ""
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "keywords",
|
|
|
|
|
content:
|
|
|
|
|
"postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket, sse, graphql"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "X-UA-Compatible",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: "IE=edge, chrome=1"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
itemprop: "name",
|
|
|
|
|
content: `${meta.name} \u2022 ${meta.shortDescription}`
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
itemprop: "description",
|
|
|
|
|
content: meta.description
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
itemprop: "image",
|
2019-11-11 13:53:35 +00:00
|
|
|
content: `${routerBase.router.base}logo.jpg`
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
|
2019-09-04 06:49:17 +00:00
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "application-name",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: meta.name
|
|
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
// Add to homescreen for Safari on iOS
|
2019-09-04 06:49:17 +00:00
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "apple-mobile-web-app-capable",
|
|
|
|
|
content: "yes"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "apple-mobile-web-app-status-bar-style",
|
|
|
|
|
content: "black-translucent"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "apple-mobile-web-app-title",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: meta.name
|
|
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
// Windows phone tile icon
|
2019-09-04 06:49:17 +00:00
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "msapplication-TileImage",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: `${routerBase.router.base}icons/icon-144x144.png`
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "msapplication-TileColor",
|
2019-12-17 19:13:15 +00:00
|
|
|
content: "#202124"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "msapplication-tap-highlight",
|
|
|
|
|
content: "no"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
// OpenGraph
|
2019-09-04 06:49:17 +00:00
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
property: "og:site_name",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: meta.name
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
property: "og:url",
|
|
|
|
|
content: "https://postwoman.io"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
property: "og:type",
|
|
|
|
|
content: "website"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
property: "og:title",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: `${meta.name} \u2022 ${meta.shortDescription}`
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
property: "og:description",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: meta.description
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
property: "og:image",
|
2019-11-11 13:53:35 +00:00
|
|
|
content: `${routerBase.router.base}logo.jpg`
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
// Twitter
|
2019-09-04 06:49:17 +00:00
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "twitter:card",
|
2019-11-11 13:53:35 +00:00
|
|
|
content: "summary_large_image"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "twitter:site",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: "@liyasthomas"
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "twitter:creator",
|
2019-09-04 06:49:17 +00:00
|
|
|
content: "@liyasthomas"
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "twitter:url",
|
2019-09-05 14:59:16 +00:00
|
|
|
content: "https://postwoman.io"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "twitter:title",
|
2019-11-11 13:31:49 +00:00
|
|
|
content: `${meta.name} \u2022 ${meta.shortDescription}`
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "twitter:description",
|
2019-11-11 13:31:49 +00:00
|
|
|
content: meta.description
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "twitter:image",
|
2019-11-30 21:39:58 +00:00
|
|
|
content: "https://postwoman.io/logo.jpg"
|
2019-11-28 15:11:52 +00:00
|
|
|
}
|
2019-08-24 03:06:57 +00:00
|
|
|
],
|
2019-11-28 15:11:52 +00:00
|
|
|
link: [
|
|
|
|
|
{
|
|
|
|
|
rel: "icon",
|
|
|
|
|
type: "image/x-icon",
|
2019-09-05 09:02:24 +00:00
|
|
|
href: `${routerBase.router.base}favicon.ico`
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
// Home-screen icons (iOS)
|
2019-09-04 06:49:17 +00:00
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
rel: "apple-touch-icon",
|
2019-09-04 06:49:17 +00:00
|
|
|
href: `${routerBase.router.base}icons/icon-48x48.png`
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
rel: "apple-touch-icon",
|
|
|
|
|
sizes: "72x72",
|
2019-09-04 06:49:17 +00:00
|
|
|
href: `${routerBase.router.base}icons/icon-72x72.png`
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
rel: "apple-touch-icon",
|
|
|
|
|
sizes: "96x96",
|
2019-09-04 06:49:17 +00:00
|
|
|
href: `${routerBase.router.base}icons/icon-96x96.png`
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
rel: "apple-touch-icon",
|
|
|
|
|
sizes: "144x144",
|
2019-09-04 06:49:17 +00:00
|
|
|
href: `${routerBase.router.base}icons/icon-144x144.png`
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
rel: "apple-touch-icon",
|
|
|
|
|
sizes: "192x192",
|
2019-09-04 06:49:17 +00:00
|
|
|
href: `${routerBase.router.base}icons/icon-192x192.png`
|
2019-11-28 15:11:52 +00:00
|
|
|
}
|
2019-08-24 03:06:57 +00:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Customize the progress-bar color
|
|
|
|
|
*/
|
|
|
|
|
loading: {
|
2019-11-28 15:11:52 +00:00
|
|
|
color: "var(--ac-color)"
|
2019-09-04 06:49:17 +00:00
|
|
|
},
|
2019-10-11 08:53:07 +00:00
|
|
|
/*
|
|
|
|
|
** Customize the loading indicator
|
|
|
|
|
*/
|
|
|
|
|
loadingIndicator: {
|
2019-11-28 15:11:52 +00:00
|
|
|
name: "pulse",
|
|
|
|
|
color: "var(--ac-color)",
|
|
|
|
|
background: "var(--bg-color)"
|
2019-10-11 08:53:07 +00:00
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Global CSS
|
|
|
|
|
*/
|
2019-08-24 03:06:57 +00:00
|
|
|
css: [
|
2019-11-28 15:11:52 +00:00
|
|
|
"~/assets/css/styles.scss",
|
|
|
|
|
"~/assets/css/themes.scss",
|
|
|
|
|
"~/assets/css/fonts.scss"
|
2019-08-24 03:06:57 +00:00
|
|
|
],
|
|
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Plugins to load before mounting the App
|
|
|
|
|
*/
|
2019-11-28 15:11:52 +00:00
|
|
|
plugins: [
|
|
|
|
|
{
|
|
|
|
|
src: "~/plugins/vuex-persist"
|
2019-10-18 20:28:51 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
src: "~/plugins/v-tooltip"
|
2019-09-04 06:49:17 +00:00
|
|
|
}
|
2019-08-24 03:06:57 +00:00
|
|
|
],
|
|
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Nuxt.js dev-modules
|
|
|
|
|
*/
|
2019-11-02 05:32:21 +00:00
|
|
|
buildModules: [],
|
2019-08-24 03:06:57 +00:00
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Nuxt.js modules
|
|
|
|
|
*/
|
2019-08-24 03:06:57 +00:00
|
|
|
modules: [
|
|
|
|
|
// See https://goo.gl/OOhYW5
|
2019-11-28 15:11:52 +00:00
|
|
|
["@nuxtjs/pwa"],
|
|
|
|
|
["@nuxtjs/axios"],
|
|
|
|
|
["@nuxtjs/toast"],
|
|
|
|
|
["@nuxtjs/google-analytics"],
|
|
|
|
|
["@nuxtjs/sitemap"],
|
|
|
|
|
[
|
|
|
|
|
"@nuxtjs/google-tag-manager",
|
|
|
|
|
{
|
|
|
|
|
id: process.env.GTM_ID || "GTM-MXWD8NQ"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
["@nuxtjs/robots"],
|
|
|
|
|
["nuxt-i18n"]
|
2019-08-24 03:06:57 +00:00
|
|
|
],
|
2019-09-29 13:21:43 +00:00
|
|
|
pwa: {
|
|
|
|
|
manifest: {
|
|
|
|
|
name: meta.name,
|
|
|
|
|
short_name: meta.name,
|
2019-10-01 11:43:23 +00:00
|
|
|
|
2019-09-29 13:21:43 +00:00
|
|
|
display: "standalone",
|
2019-10-01 11:43:23 +00:00
|
|
|
|
2019-12-17 19:13:15 +00:00
|
|
|
theme_color: "#202124",
|
|
|
|
|
background_color: "#202124",
|
2019-09-29 13:21:43 +00:00
|
|
|
start_url: `${routerBase.router.base}`
|
|
|
|
|
},
|
2019-10-01 11:43:23 +00:00
|
|
|
|
2019-09-29 13:21:43 +00:00
|
|
|
meta: {
|
|
|
|
|
description: meta.shortDescription,
|
2019-12-17 19:13:15 +00:00
|
|
|
theme_color: "#202124"
|
2019-09-29 13:21:43 +00:00
|
|
|
},
|
2019-10-01 11:43:23 +00:00
|
|
|
|
2019-11-28 15:11:52 +00:00
|
|
|
icons: (sizes => {
|
2019-09-29 13:21:43 +00:00
|
|
|
let icons = [];
|
|
|
|
|
for (let size of sizes) {
|
|
|
|
|
icons.push({
|
2019-11-28 15:11:52 +00:00
|
|
|
src: `${routerBase.router.base}icons/icon-${size}x${size}.png`,
|
|
|
|
|
type: "image/png",
|
|
|
|
|
sizes: `${size}x${size}`
|
2019-09-29 13:21:43 +00:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return icons;
|
|
|
|
|
})([48, 72, 96, 144, 192, 512])
|
|
|
|
|
},
|
2019-09-28 09:33:16 +00:00
|
|
|
toast: {
|
2019-11-28 15:11:52 +00:00
|
|
|
position: "bottom-center",
|
2019-10-20 00:57:47 +00:00
|
|
|
duration: 3000,
|
2019-11-28 15:11:52 +00:00
|
|
|
theme: "bubble",
|
2019-10-20 00:57:47 +00:00
|
|
|
keepOnHover: true
|
2019-09-28 09:33:16 +00:00
|
|
|
},
|
|
|
|
|
googleAnalytics: {
|
2019-11-28 15:11:52 +00:00
|
|
|
id: process.env.GA_ID || "UA-61422507-2"
|
2019-09-28 09:33:16 +00:00
|
|
|
},
|
2019-10-02 07:10:47 +00:00
|
|
|
sitemap: {
|
2019-11-28 15:11:52 +00:00
|
|
|
hostname: "https://postwoman.io"
|
2019-10-02 07:10:47 +00:00
|
|
|
},
|
2019-11-03 06:06:41 +00:00
|
|
|
robots: {
|
2019-11-28 15:11:52 +00:00
|
|
|
UserAgent: "*",
|
|
|
|
|
Disallow: "",
|
|
|
|
|
Allow: "/",
|
|
|
|
|
Sitemap: "https://postwoman.io/sitemap.xml"
|
2019-11-03 06:06:41 +00:00
|
|
|
},
|
2019-11-27 08:45:11 +00:00
|
|
|
i18n: {
|
2019-11-28 15:11:52 +00:00
|
|
|
locales: [
|
|
|
|
|
{
|
|
|
|
|
code: "en",
|
|
|
|
|
name: "English",
|
|
|
|
|
iso: "en-US",
|
|
|
|
|
file: "en-US.js"
|
2019-11-27 08:45:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
code: "es",
|
|
|
|
|
name: "Español",
|
|
|
|
|
iso: "es-ES",
|
|
|
|
|
file: "es-ES.js"
|
2019-11-27 15:49:59 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
code: "fr",
|
|
|
|
|
name: "Français",
|
|
|
|
|
iso: "fr-FR",
|
|
|
|
|
file: "fr-FR.js"
|
2019-11-27 17:33:02 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
code: "fa",
|
|
|
|
|
name: "Farsi",
|
|
|
|
|
iso: "fa-IR",
|
|
|
|
|
file: "fa-IR.js"
|
2019-11-27 23:01:34 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
code: "pt",
|
|
|
|
|
name: "Português Brasileiro",
|
|
|
|
|
iso: "pt-BR",
|
|
|
|
|
file: "pt-BR.js"
|
2019-11-28 01:38:31 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
code: "cn",
|
|
|
|
|
name: "简体中文",
|
|
|
|
|
iso: "zh-CN",
|
|
|
|
|
file: "zh-CN.js"
|
2019-11-28 02:51:42 +00:00
|
|
|
},
|
|
|
|
|
{
|
2019-11-28 15:11:52 +00:00
|
|
|
code: "id",
|
|
|
|
|
name: "Bahasa Indonesia",
|
|
|
|
|
iso: "id-ID",
|
|
|
|
|
file: "id-ID.js"
|
2019-11-30 21:39:58 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
code: "tr",
|
|
|
|
|
name: "Türkçe",
|
|
|
|
|
iso: "tr-TR",
|
|
|
|
|
file: "tr-TR.js"
|
2019-12-12 22:35:59 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
code: "de",
|
|
|
|
|
name: "Deutsch",
|
|
|
|
|
iso: "de-DE",
|
|
|
|
|
file: "de-DE.js"
|
2019-12-13 06:34:59 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
code: "ja",
|
|
|
|
|
name: "日本語",
|
|
|
|
|
iso: "ja-JP",
|
|
|
|
|
file: "ja-JP.js"
|
2019-11-27 15:55:15 +00:00
|
|
|
}
|
2019-11-27 08:45:11 +00:00
|
|
|
],
|
2019-11-28 15:11:52 +00:00
|
|
|
defaultLocale: "en",
|
2020-01-14 15:43:41 +00:00
|
|
|
vueI18n: {
|
|
|
|
|
fallbackLocale: "en"
|
|
|
|
|
},
|
2019-11-27 08:45:11 +00:00
|
|
|
lazy: true,
|
2019-11-28 15:11:52 +00:00
|
|
|
langDir: "lang/"
|
2019-11-27 08:45:11 +00:00
|
|
|
},
|
2019-08-24 03:06:57 +00:00
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Build configuration
|
|
|
|
|
*/
|
2019-08-24 03:06:57 +00:00
|
|
|
build: {
|
|
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** You can extend webpack config here
|
|
|
|
|
*/
|
|
|
|
|
extend(config, ctx) {}
|
2019-08-24 03:24:43 +00:00
|
|
|
},
|
|
|
|
|
/*
|
2019-09-04 06:49:17 +00:00
|
|
|
** Generate configuration
|
|
|
|
|
*/
|
2019-08-24 03:24:43 +00:00
|
|
|
generate: {
|
|
|
|
|
fallback: true
|
2019-08-24 16:20:19 +00:00
|
|
|
},
|
|
|
|
|
/*
|
|
|
|
|
** Router configuration
|
|
|
|
|
*/
|
|
|
|
|
...routerBase
|
2019-11-28 15:11:52 +00:00
|
|
|
};
|