nuxt-highlight.js

 

https://github.com/Llang8/nuxt-highlightjs

 

GitHub - Llang8/nuxt-highlightjs: Highlight.js syntax highlighting for Nuxt.js

Highlight.js syntax highlighting for Nuxt.js. Contribute to Llang8/nuxt-highlightjs development by creating an account on GitHub.

github.com

pre태그와 code 태그를 사용하여 각 프로그래밍 언어를 하이라이트해주는 모듈이다. 

 

 

vue-dompurify-html

 

https://github.com/LeSuisse/vue-dompurify-html

 

GitHub - LeSuisse/vue-dompurify-html: Safe replacement for the v-html directive

Safe replacement for the v-html directive. Contribute to LeSuisse/vue-dompurify-html development by creating an account on GitHub.

github.com

Editor로 작성된 데이터는 v-html을 통해 파싱해서 보여줘야한다. 다만 v-html은 xss공격에 취약해서 eslint 경고가 뜬다. 그럴경우 위 모듈을 사용해서 작성하면 된다.

 

 

moment-module

 

https://github.com/nuxt-community/moment-module

 

GitHub - nuxt-community/moment-module: Efficient Moment.js integration for Nuxt

Efficient Moment.js integration for Nuxt. Contribute to nuxt-community/moment-module development by creating an account on GitHub.

github.com

new Date() 시간 객체를 지역 설정에 맞게 표시해준다. 

 

 

 

'Front-End > Vue & Nuxt' 카테고리의 다른 글

Eslint Babel정리  (0) 2022.02.27
Nuxt.js Buefy Pagination  (0) 2022.02.26
Nuxt.js SCSS 사용  (0) 2022.02.26
Nuxt.js Transition  (0) 2022.02.26
Nuxt 라이브러리 적용  (0) 2022.02.15

Nuxt.js에서 SCSS를 사용하는 방법이다. 

 

 

https://nuxtjs.org/docs/features/configuration/

 

Configuration

By default, Nuxt is configured to cover most use cases. This default configuration can be overwritten with the nuxt.config.js file.

nuxtjs.org

 

 

SASS Loader 설치

yarn add --dev sass sass-loader@10
npm install --save-dev sass sass-loader@10

 

 

nuxt.config.js 정의

export default {
  css: [
    // Load a Node.js module directly (here it's a Sass file)
    'bulma',
    // CSS file in the project
    '~/assets/css/main.css',
    // SCSS file in the project
    '~/assets/css/main.scss'
  ]
}

 

 

추가)

 

SCSS에서 Variable을 사용하고 싶을 때가 있을 것이다. 그럴경우 추가 Module을 설치해야한다. 

https://github.com/nuxt-community/style-resources-module

 

GitHub - nuxt-community/style-resources-module: Nobody likes extra @import statements!

Nobody likes extra @import statements! Contribute to nuxt-community/style-resources-module development by creating an account on GitHub.

github.com

 

Style Resource라는 모듈이다. 

 

yarn add -D @nuxtjs/style-resources

 

nuxt.config.js

export default {
  buildModules: ['@nuxtjs/style-resources'],
  styleResources: {
    scss: [
      './assets/vars/*.scss',
      './assets/abstracts/_mixins.scss' // use underscore "_" & also file extension ".scss"
      ]
  }
}

'Front-End > Vue & Nuxt' 카테고리의 다른 글

Nuxt.js Buefy Pagination  (0) 2022.02.26
Nuxt.js 유용한 모듈 정리  (0) 2022.02.26
Nuxt.js Transition  (0) 2022.02.26
Nuxt 라이브러리 적용  (0) 2022.02.15
Vercel 배포  (0) 2022.02.10

https://vuejs.org/guide/built-ins/transition.html#css-based-transitions

 

Transition | Vue.js

 

vuejs.org

https://nuxtjs.org/docs/features/transitions

 

Transitions

Nuxt uses the transition component to let you create amazing transitions/animations between your routes.

nuxtjs.org

 

Nuxt에서 transition을 사용하는 방법에 대해서 알아보자.

 

export default {
  // Can be a String
  transition: ''
  // Or an Object
  transition: {}
  // or a Function
  transition (to, from) {}
}

 

 

지역 사용

 

pages/index.vue

export default {
  transition: 'home'
}

<style>
  .home-enter-active, .home-leave-active { transition: opacity .5s; }
  .home-enter, .home-leave-active { opacity: 0; }
</style>

transition의 name을 home으로 설정했기 때문에 .home이 된다. test로 설정하면 .test이런식으로 설정이 된다.

 

 

전역 사용

 

main.css

 

page변경 시 설정

.page-enter-active,
.page-leave-active {
  transition: opacity 0.5s;
}
.page-enter,
.page-leave-to {
  opacity: 0;
}
export default {
  css: ['~/assets/main.css']
}

 

layout변경 시 설정

.layout-enter-active,
.layout-leave-active {
  transition: opacity 0.5s;
}
.layout-enter,
.layout-leave-active {
  opacity: 0;
}

 

만약에 default 설정을 바꾸고 싶다면 다음처럼 설정 하면 된다.

 

nuxt.config.js

// Pages

export default {
  pageTransition: 'my-page'
  // or
  pageTransition: {
    name: 'my-page',
    mode: 'out-in',
    beforeEnter (el) {
      console.log('Before enter...');
    }
  }
}


// Layouts

export default {
  layoutTransition: 'my-layouts'
  // or
  layoutTransition: {
    name: 'my-layouts',
    mode: 'out-in'
  }
}

 

 

추가)

 

mode : out-in과 in-out이 있는데 기본 값은 out-in이다. in-out으로도 설정할 수 있다. transition이 안에서 밖으로 효과가 나타날것인지 아니면 반대로 나타날 것인지 설정해준다.

 

:name="transitionName" 동적으로 transition을 설정하여 사용할 수도 있다.

 

 

 

'Front-End > Vue & Nuxt' 카테고리의 다른 글

Nuxt.js 유용한 모듈 정리  (0) 2022.02.26
Nuxt.js SCSS 사용  (0) 2022.02.26
Nuxt 라이브러리 적용  (0) 2022.02.15
Vercel 배포  (0) 2022.02.10
Nuxt-2 ezst nuxt.config.js  (0) 2022.01.30

Nuxt에서 Brython을 적용하는 방법에 대해서 기술해본다. 

정확하게는 js 라이브러리 파일을 Nuxt에다 적용하는 방법이다. 

 

참고문서 

 

https://develop365.gitlab.io/nuxtjs-0.10.7-doc/ko/guide/plugins/

 

플러그인 - Nuxt.js

모든 Vue 인스턴스의 라이프사이클에서 클라이언트사이드와 서버사이드 모두 호출되는 메소드 는 beforeCreate와 created 뿐입니다. 다른 메소드들은 모두 클라이언트 사이드에서만 호출됨을 명심하

develop365.gitlab.io

 

https://stackoverflow.com/questions/63190124/how-can-solve-the-error-babel-maximum-size-500kb-issue-in-server

 

How can solve the ERROR [BABEL] maximum size 500KB issue in server?

I am using NUXTJS application for an SSR page, but i am getting an error of bootstrap-vue icon size issue. The file is hosted in AWS server and this will be the error The code generator has deoptim...

stackoverflow.com

 

First,

static/vendor/brython-runnder.bundle.js에 파일 저장

 

1. vendor를 통한 적용방법 (라이브러리 용량이 적을경우)

 

  build: {
    vendor: ['vue-brython'],
    babel: {
      compact: true,
    },
  },

 

 

 

2. plugins 파일 생성 (라이브러리 용량이 크고 여러 곳에서 사용할 경우)

 

plugins/vue-brython.js

 

import Vue from 'vue'
import BrythonRunner from 'static/vendor/brython-runner.bundle'

Vue.use(BrythonRunner)
  plugins: [
    { src: '~/plugins/vue-brython', ssr: false },
  ],
  
  build: {
    babel: {
      compact: true,
    },
  },

 

 

3. 직접 적용 (한 곳에서만 사용할 경우)

 

<script>
import {BrythonRunner} from 'static/vendor/brython-runner.bundle';
</script>

다만 직접 가져오는 방식은 관리와 window 객체를 사용한 라이브러리일 경우 오류의 문제점이 발생한다.

 

 

 

Settings

 

코드 규칙을 위한 eslint는 까다롭기 때문에 형식에 조금이라도 벗어나면 발생하면 바로 오류를 발생시킨다. 

이미 plugins이나 vendor를 통해 전역으로 설정한 라이브러리라도 component나 page에 정의가 안되어 있을경우 오류를 발생시킨다.

 

 

.eslintrc.js

  globals: {
    BrythonRunner: true,
  },

위와 같이 BrythonRunner를 전역으로 설정해줘야한다. 

 

또한, 라이브러리에 eslint 적용을 제외하기 위해 .eslintignore 파일을 만든다. 

 

static/vendor/brython-runner.bundle.js

'Front-End > Vue & Nuxt' 카테고리의 다른 글

Nuxt.js SCSS 사용  (0) 2022.02.26
Nuxt.js Transition  (0) 2022.02.26
Vercel 배포  (0) 2022.02.10
Nuxt-2 ezst nuxt.config.js  (0) 2022.01.30
Hide Navbar on Scroll Down in Vue  (0) 2022.01.05

https://vercel.com/

 

Develop. Preview. Ship. For the best frontend teams – Vercel

Deploy web projects with the best frontend developer experience and highest end-user performance.

vercel.com

 

Vercel로 간단하게 Nuxt 프로젝트를 배포하는 방법에 대해서 정리

 

1. Vercel 설치

 

 

yarn global add vercel

npm i -g vercel

 

 

2. 환경 변수 설정

 

 

yarn : C:\Users\i\AppData\Local\Yarn\bin 추가

 

vercel -v

 

 

3. now.json 추가

 

프로젝트에 다음파일을 만들어 내용을 추가해주면 된다.

{
  "version": 2,
  "builds": [
    {
      "src": "nuxt.config.js",
      "use": "@nuxtjs/vercel-builder",
      "config": {}
    }
  ]
}

 

 

4. 배포

 

vercel .

 

 

5. 환경변수 설정

 

https://vercel.com/docs/concepts/projects/environment-variables

'Front-End > Vue & Nuxt' 카테고리의 다른 글

Nuxt.js Transition  (0) 2022.02.26
Nuxt 라이브러리 적용  (0) 2022.02.15
Nuxt-2 ezst nuxt.config.js  (0) 2022.01.30
Hide Navbar on Scroll Down in Vue  (0) 2022.01.05
Nuxt.js Async, Fetch  (0) 2022.01.05

Design & Impression

https://www.pinterest.co.kr/search/pins/?rs=ac&len=2&q=responsive%20website&eq=responsive&etslf=5843&term_meta[]=responsive%7Cautocomplete%7C1&term_meta[]=website%7Cautocomplete%7C1 

 

Pinterest

요리법, 집 꾸미기 아이디어, 영감을 주는 스타일 등 시도해 볼 만한 아이디어를 찾아서 저장하세요.

www.pinterest.co.kr

 

 

https://dribbble.com/

 

Dribbble - Discover the World’s Top Designers & Creative Professionals

Discover the world’s top designers & creatives Dribbble is the leading destination to find & showcase creative work and home to the world's best design professionals. Sign up

dribbble.com

 

https://codepen.io/

 

CodePen

An online code editor, learning environment, and community for front-end web development using HTML, CSS and JavaScript code snippets, projects, and web applications.

codepen.io

 

https://todomvc.com/

 

TodoMVC

Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, Spine and many more

todomvc.com

https://2colors.colorion.co/

 

 

https://uigradients.com/

https://www.w3schools.com/tags/ref_colornames.asp

 

 

API

 

https://giphy.com/

 

GIPHY - Be Animated

GIPHY is the platform that animates your world. Find the GIFs, Clips, and Stickers that make your conversations more positive, more expressive, and more you.

giphy.com

 

 

https://www.spotify.com/kr-ko/premium/?utm_source=kr_brand_none_text&utm_medium=paidsearch&utm_campaign=alwayson_kr_kr_premiumbusiness_koreasearch+desktop+core_brand+text+exact+kr+google&gclid=Cj0KCQiArt6PBhCoARIsAMF5wagDLHJh7_rjJNSiPRZeLWNX9c_b-N_I_iYCYvzp12WxkhHYrRzJB5MaAkafEALw_wcB&gclsrc=aw.ds 

 

Premium 멤버십

일주일 동안 Spotify의 Premium 스트리밍 서비스를 체험해보세요. 이미 체험해보셨나요? 지금 가입하면 3개월 더 무료로 이용하실 수 있습니다.

www.spotify.com

 

https://www.themoviedb.org/?language=ko 

 

The Movie Database (TMDB)

찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.

www.themoviedb.org

 

https://www.edamam.com/

 

Edamam - Eat better!

 

www.edamam.com

 

https://apimeme.com/

 

APIMeme - Meme Generator API

 

apimeme.com

 

https://www.kiwoom.com/h/customer/download/VOpenApiInfoView?Ap4kn=NaMHTpMR2WhPhQSqyHq3iQEfMrA8gChfhQdSoiEahBtyNaMJhBnFWjXHojhZTQUXH6EAHOErrHXj0iEIS8iAAq61HQXDrjLq2et3dTGmWrMerO8JwrdTwQUM0EUJwXLaTTgqTJME0eiiijda28d6wXdFNBXTdH5aTrGnT1dLG1oZwJfaNxGuwpdFSjiTgxiei1AEw1UCWqArWJdpI6dS0VLpW1SVoB8JIiEfw1LMWH6Zo4MqwT3awiAGWTUYIjUpdJAMT4wuSJDQIBXJH6Di2VS2oVi0rELDIiGJwqdHGJD8o45JSXEA2rUayEUZojUgG1guTpdfojiU0jdtIQDCdHEmd4XiwBGaTVTpA1LWiEUeoHTuGBdgT1wudJGur6SrG6uuHxdFGrSjrxStwVAQHEAOWpS0d63hG1AqdHf3WTDeIQqJIXEHdHGxoTDQW8XhIQM1AEAgyOEZWqXEi1UK2TIuHTtSdjXrSeXnA1LtWrXVHT3I0JDKT4dpgxSGIBAaTV94wXdSNQXjdQ5a0OMfgxUEwOi10jdqIrXfdVdZwOM8wxGaiqAngQUad1TZdBAqIHtfdVdaNr9ZdTXaSOLK0HE4rjiUW8haITUudHErdpMYdiSq0Jiu2rUqd1i0ApUq28UugOEg2xX10BJFlCMnhBnFGriQAxLQ2ei6Ae8Zg4GFgrIaIrgJGQIqgQGUAx9qAHIqgeouAx6Dg4oD2x61Gro3gxTa2xdQIBg1GBo4IpAUIHGXIropg48DIQMX2eMFAB84AriBAxLXIBIpGxEXgxT1AeiQgB9aGB5JAHo1gpMQgr5pAHAU2r8p2rG6gBAQGBhFlCMUwahPHqqcVVJ%253D&JRO2QHs6F=ZHVtbXlWYWwlM0Qw 

 

키움증권

키움 Open API+는 프로그램 개발 확장성을 고려하여 OCX 컨트롤로 제작 지원합니다. 사용자 편의에 따라 VB, 엑셀, 웹기반, MFC 등으로 프로그램 제작이 가능합니다. 데이터 요청 및 수신은 TR 서비스

www.kiwoom.com

 

https://www.data.go.kr/

 

https://developers.kakao.com/

 

Kakao Developers

카카오 API를 활용하여 다양한 어플리케이션을 개발해보세요. 카카오 로그인, 메시지 보내기, 친구 API, 인공지능 API 등을 제공합니다.

developers.kakao.com

 

https://developers.naver.com/main/

 

NAVER Developers

네이버 오픈 API들을 활용해 개발자들이 다양한 애플리케이션을 개발할 수 있도록 API 가이드와 SDK를 제공합니다. 제공중인 오픈 API에는 네이버 로그인, 검색, 단축URL, 캡차를 비롯 기계번역, 음

developers.naver.com

 

https://publicapi.dev/

 

PublicAPI - A collection of free APIs for software and web development use

PublicAPI is a free directory of public APIs for software, mobile and web development use. You can search, filter and mark the APIs and use them in your apps for free!

publicapi.dev

 

https://github.com/public-apis/public-apis

 

GitHub - public-apis/public-apis: A collective list of free APIs

A collective list of free APIs. Contribute to public-apis/public-apis development by creating an account on GitHub.

github.com

 

 

+ Recent posts