<commit_before>import Vue from 'vue'
import Vuex from 'vuex'
import VueRouter from 'vue-router'
import axios from 'axios'
import './axios-mock'
import '~/plugins/font-awesome'
import Modal from '~/plugins/modal/modal'
import '~/plugins/emojify'

Vue.use(Vuex)
Vue.use(VueRouter)
Vue.use(Modal)

Vue.directive('emojify', {
  bind: () => {},
  unbind: () => {}
})
Vue.directive('on-click-outside', {
  bind: () => {},
  unbind: () => {}
})

Vue.component('no-ssr', {
  functional: true,
  render: (h, context) => h('div', context.data, context.children)
})

// emoji picker
Vue.component('picker', {
  render: h => h('div')
})

Vue.use({
  install(Vue) {
    // https://github.com/nuxt-community/axios-module/blob/27aa4bdc7746d84d063fe9cfa34850bc6f08e141/lib/plugin.template.js#L37
    for (let method of [
      'request',
      'delete',
      'get',
      'head',
      'options',
      'post',
      'put',
      'patch'
    ]) {
      axios[`$${method}`] = function() {
        return this[method].apply(this, arguments).then(res => res && res.data)
      }
    }
    Vue.prototype.$axios = axios
  }<commit_msg>Add $resource<commit_after>import Vue from 'vue'
import Vuex from 'vuex'
import VueRouter from 'vue-router'
import axios from 'axios'
import './axios-mock'
import '~/plugins/font-awesome'
import Modal from '~/plugins/modal/modal'
import '~/plugins/emojify'

Vue.use(Vuex)
Vue.use(VueRouter)
Vue.use(Modal)

Vue.directive('emojify', {
  bind: () => {},
  unbind: () => {}
})
Vue.directive('on-click-outside', {
  bind: () => {},
  unbind: () => {}
})

Vue.component('no-ssr', {
  functional: true,
  render: (h, context) => h('div', context.data, context.children)
})

// emoji picker
Vue.component('picker', {
  render: h => h('div')
})

Vue.use({
  install(Vue) {
    // https://github.com/nuxt-community/axios-module/blob/27aa4bdc7746d84d063fe9cfa34850bc6f08e141/lib/plugin.template.js#L37
    for (let method of [
      'request',
      'delete',
      'get',
      'head',
      'options',
      'post',
      'put',
      'patch'
    ]) {
      axios[`$${method}`] = function() {
        return this[method].apply(this, arguments).then(res => res && res.data)
      }
    }
    Vue.prototype.$axios = axios

    // $resource

    Vue.prototype.$resource = (url = '', options = {}) => {
      return axios.$get(url, {
        params: {
          include_post_raw: 1,
          include_directed_posts: 0,
          include_message_raw: 1,
          ...options
        }
      })
    }
  }
{'fraction_non_alphanumeric': 0.189146049481245, 'fraction_numerical': 0.02194732641660016, 'mean_word_length': 2.8392036753445637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1829249', 'n_tokens_mistral': 985, 'n_tokens_neox': 948, 'n_words': 163}