npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@newbiz/vue-maintainer-libs

v1.7.0

Published

Vue.js maintainer 라이브러리

Downloads

45

Readme

Vue.js Maintainer Libs

npm node NPM Vue.js maintainer library.

This project was generated by Vessel. For a simple and quick reference, click here.

About

Vue.js 프로젝트 부트스트래핑을 위한 라이브러리.

Installation

해당 모듈을 사용할 프로젝트에서는 아래와 같이 설치한다.

$ npm install --save @newbiz/vue-maintainer-libs
or
$ yarn add @newbiz/vue-maintainer-libs

Usage

src/main.js에서 각 router, store, plugins 등의 설정을 옵션으로 넘겨준다. 해당 모듈을 사용하는 각 프로젝트 코드를 참조 한다.

import Vue from 'vue'
import Vuex from 'vuex'
import { Maintainer } from '@newbiz/vue-maintainer-libs'
import * as appPlugins from '@/plugins'
import * as appRouter from '@/router'
import * as appModulesStore from '@/store'
import appMixin from '@/mixins'
import appDirective from '@/directive'
import appRootStore from '@/store/root'
import App from '@/App'

const { buildEnv, router, store } = Maintainer.initialize(Vue, {
  showLogEnvs: ['local'],
  router: {
    routes: appRouter,
    fallback: {
      // fallback to 404
      path: '/*',
      name: 'application.404',
      component: () => import(/* webpackChunkName: "application.404" */ '@/views/Application/PageNotFound.vue'),
    },
    option: {
      // Vue-Router 옵션
      base: process.env.BASE_URL,
      scrollBehavior () {
        return { x: 0, y: 0 }
      },
    },
    navigationGuards: {
      // Navigation Guard용 함수선언
      beforeEach: (to, from) => {},
      beforeResolve: (to, from) => {},
      afterEach: (to, from) => {},
    },
  },
  store: {
    vuex: Vuex,
    root: appRootStore, // root에 modules 포함 가능 (단, 전체 initialState 취합 불가)
    modules: appModulesStore, // (optional)
  },
  plugins: appPlugins,
  serviceWorker: process.env.NODE_ENV === 'production' ? {
    base: '/',
    file: 'service-worker.js',
    hook: {
      ready () { console.log('완료') },
      error (error) { console.error(error) },
      ...
    },
  } : null,
  filter: null,
  mixin: appMixin,
  directive: appDirective,
  prototype: null, // 정상 처리되지만 IDE에서 코드인식에 문제 있음 (Vue.prototype 사용권장).
  component: null, // 정상 처리되지만 IDE에서 코드인식에 문제 있음 (Vue.component 사용권장).
})

// 해당 라이브러리 내에서 설정하므로 별도로 아래처럼 선언할 필요는 없다.
// Vue.prototype.$env = buildEnv

// Vue 실행
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')

Change Log

해당 프로젝트의 CHANGELOG.md 파일 참조.

License

해당 프로젝트의 LICENSE 파일 참조.