1 Star 0 Fork 0

nuts / hoppscotch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nuxt.config.js 7.50 KB
一键复制 编辑 原始数据 按行查看 历史
require("dotenv").config()
// Some helpful application constants.
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
export const options = {
name: "Hoppscotch",
shortDescription: "A free, fast and beautiful API request builder",
description: "Helps you create requests faster, saving precious time on development.",
loading: {
color: "#50fa7b",
background: "#202124",
},
app: {
color: "#ffffff",
background: "#202124",
accent: "#50fa7b",
},
social: {
twitter: "@liyasthomas",
},
}
export default {
mode: "spa",
target: "static",
/*
** Headers of the page
*/
head: {
title: `${options.name}${options.shortDescription}`,
meta: [
{
name: "keywords",
content:
"hoppscotch, hopp scotch, hoppscotch online, hoppscotch app, 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, socketio",
},
{
name: "X-UA-Compatible",
content: "IE=edge, chrome=1",
},
{
itemprop: "name",
content: `${options.name}${options.shortDescription}`,
},
{
itemprop: "description",
content: options.description,
},
{
itemprop: "image",
content: `${process.env.BASE_URL}logo.jpg`,
},
{
property: "og:image",
content: `${process.env.BASE_URL}logo.jpg`,
},
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
{
name: "application-name",
content: options.name,
},
// Windows phone tile icon
{
name: "msapplication-TileImage",
content: `/icons/icon-144x144.png`,
},
{
name: "msapplication-TileColor",
content: options.app.background,
},
{
name: "msapplication-tap-highlight",
content: "no",
},
],
link: [
{
rel: "icon",
type: "image/x-icon",
href: `/favicon.ico`,
},
// Home-screen icons (iOS)
{
rel: "apple-touch-icon",
href: `/icons/icon-48x48.png`,
},
{
rel: "apple-touch-startup-image",
href: `/icons/icon-72x72.png`,
},
{
rel: "apple-touch-icon",
sizes: "192x192",
href: `/icons/icon-192x192.png`,
},
],
},
/*
** Customize the progress-bar color
*/
loading: {
color: "var(--ac-color)",
continuous: true,
},
/*
** Customize the loading indicator
*/
loadingIndicator: {
name: "pulse",
color: options.loading.color,
background: options.loading.background,
},
/*
** Global CSS
*/
css: ["~/assets/css/styles.scss", "~/assets/css/themes.scss", "~/assets/css/fonts.scss"],
/*
** Plugins to load before mounting the App
*/
plugins: ["~/plugins/vuex-persist", "~/plugins/v-tooltip"],
/*
** Auto import components
** See https://nuxtjs.org/api/configuration-components
*/
components: true,
/*
** Nuxt.js dev-modules
*/
buildModules: [
// https://pwa.nuxtjs.org
"@nuxtjs/pwa",
// Doc: https://github.com/nuxt-community/dotenv-module
"@nuxtjs/dotenv",
// Doc: https://github.com/nuxt-community/analytics-module
"@nuxtjs/google-analytics",
// Doc: https://github.com/nuxt-community/gtm-module
"@nuxtjs/gtm",
// Doc: https://github.com/nuxt-community/svg-module
"@nuxtjs/svg",
],
/*
** Nuxt.js modules
*/
modules: [
// https://axios.nuxtjs.org
"@nuxtjs/axios",
// https://github.com/nuxt-community/modules/tree/master/packages/toast
"@nuxtjs/toast",
// Doc: https://github.com/nuxt-community/nuxt-i18n
"nuxt-i18n",
// Doc: https://github.com/nuxt-community/robots-module
"@nuxtjs/robots",
// Doc: https://github.com/nuxt-community/sitemap-module
"@nuxtjs/sitemap",
],
pwa: {
manifest: {
name: options.name,
short_name: options.name,
start_url: `/`,
display: "standalone",
background_color: options.app.background,
description: options.shortDescription,
theme_color: options.app.background,
},
meta: {
ogHost: process.env.BASE_URL,
twitterCard: "summary_large_image",
twitterSite: options.social.twitter,
twitterCreator: options.social.twitter,
description: options.shortDescription,
theme_color: options.app.background,
},
},
toast: {
position: "bottom-center",
duration: 3000,
theme: "bubble",
keepOnHover: true,
},
googleAnalytics: {
id: process.env.GA_ID || "UA-61422507-4",
},
gtm: {
id: process.env.GTM_ID || "GTM-NMKVBMV",
},
sitemap: {
hostname: process.env.BASE_URL || "https://hoppscotch.io/",
},
robots: {
UserAgent: "*",
Disallow: "",
Allow: "/",
Sitemap: `${process.env.BASE_URL}sitemap.xml`,
},
env: {
API_KEY: process.env.API_KEY,
AUTH_DOMAIN: process.env.AUTH_DOMAIN,
DATABASE_URL: process.env.DATABASE_URL,
PROJECT_ID: process.env.PROJECT_ID,
STORAGE_BUCKET: process.env.STORAGE_BUCKET,
MESSAGING_SENDER_ID: process.env.MESSAGING_SENDER_ID,
APP_ID: process.env.APP_ID,
MEASUREMENT_ID: process.env.MEASUREMENT_ID,
BASE_URL: process.env.BASE_URL,
},
i18n: {
locales: [
{
code: "en",
name: "English",
iso: "en-US",
file: "en-US.json",
},
{
code: "es",
name: "Español",
iso: "es-ES",
file: "es-ES.json",
},
{
code: "fr",
name: "Français",
iso: "fr-FR",
file: "fr-FR.json",
},
{
code: "fa",
name: "Farsi",
iso: "fa-IR",
file: "fa-IR.json",
},
{
code: "pt",
name: "Português",
iso: "pt-PT",
file: "pt-PT.json",
},
{
code: "pt-br",
name: "Português Brasileiro",
iso: "pt-BR",
file: "pt-BR.json",
},
{
code: "cn",
name: "简体中文",
iso: "zh-CN",
file: "zh-CN.json",
},
{
code: "tw",
name: "繁體中文",
iso: "zh-TW",
file: "zh-TW.json",
},
{
code: "id",
name: "Bahasa Indonesia",
iso: "id-ID",
file: "id-ID.json",
},
{
code: "tr",
name: "Türkçe",
iso: "tr-TR",
file: "tr-TR.json",
},
{
code: "de",
name: "Deutsch",
iso: "de-DE",
file: "de-DE.json",
},
{
code: "ja",
name: "日本語",
iso: "ja-JP",
file: "ja-JP.json",
},
{
code: "ko",
name: "한국어",
iso: "ko-KR",
file: "ko-KR.json",
},
],
defaultLocale: "en",
vueI18n: {
fallbackLocale: "en",
},
lazy: true,
langDir: "lang/",
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend(config, ctx) {
// Sets webpack's mode to development if `isDev` is true.
if (ctx.isDev) {
config.mode = "development"
}
config.node = {
fs: "empty",
}
},
parallel: true,
cache: true,
// hardSource: true,
},
/*
** Generate configuration
*/
generate: {
fallback: true,
},
}
1
https://gitee.com/yfliubin/hoppscotch.git
git@gitee.com:yfliubin/hoppscotch.git
yfliubin
hoppscotch
hoppscotch
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891