This file contains hidden or 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 { exec } from "child_process"; | |
| const apiUrl = process.env.VITE_API_URL; | |
| const command = `npx openapi-typescript ${apiUrl}/docs/openapi.yaml -o ./src/app/api/v1.d.ts`; | |
| exec(command, (error, stdout, stderr) => { | |
| if (error) { | |
| console.error(`error: ${error.message}`); | |
| return; | |
| } |
This file contains hidden or 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
| // ~/middleware/removeTrailingSlash.global.js | |
| export default defineNuxtRouteMiddleware((to) => { | |
| if (to.path !== '/' && to.path.endsWith('/')) { | |
| const { path, query, hash } = to; | |
| const nextPath = path.replace(/\/+$/, '') || '/'; | |
| const nextRoute = { path: nextPath, query, hash }; | |
| return navigateTo(nextRoute, { redirectCode: 301 }); | |
| } | |
| }); |
This file contains hidden or 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
| // ~/middleware/addTrailingSlash.global.js | |
| export default defineNuxtRouteMiddleware((to) => { | |
| if (to.path !== '/' && !to.path.endsWith('/')) { | |
| const { path, query, hash } = to; | |
| const nextRoute = { path: path + '/', query, hash }; | |
| return navigateTo(nextRoute, { redirectCode: 301 }); | |
| } | |
| }); |
This file contains hidden or 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> | |
| <div id="map"/> | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| mounted() { | |
| this.load_yamap_obj('https://api-maps.yandex.ru/2.1/?lang=ru_RU&apikey=YOUR_KEY') |
This file contains hidden or 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 axios from "axios"; | |
| const cookieparser = require("cookieparser"); | |
| import Cookie from "js-cookie"; | |
| export const state = () => ({ | |
| user: null, | |
| token: null | |
| }); | |
| export const mutations = { |
This file contains hidden or 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
| TERM Eterm | |
| TERM ansi | |
| TERM color-xterm | |
| TERM con[0-9]*x[0-9]* | |
| TERM cons25 | |
| TERM console | |
| TERM cygwin | |
| TERM dtterm | |
| TERM eterm-color | |
| TERM gnome |