Skip to content

Instantly share code, notes, and snippets.

Avatar
💚
RIP IE

Guillaume Chau Akryum

💚
RIP IE
View GitHub Profile
View FileExplorer.vue
<script>
import { isValidMultiName } from '@/util/folders'
import FOLDER_CURRENT from '@/graphql/folder/folderCurrent.gql'
import FOLDERS_FAVORITE from '@/graphql/folder/foldersFavorite.gql'
import FOLDER_OPEN from '@/graphql/folder/folderOpen.gql'
import FOLDER_OPEN_PARENT from '@/graphql/folder/folderOpenParent.gql'
import FOLDER_SET_FAVORITE from '@/graphql/folder/folderSetFavorite.gql'
import PROJECT_CWD_RESET from '@/graphql/project/projectCwdReset.gql'
import FOLDER_CREATE from '@/graphql/folder/folderCreate.gql'
View case.ts
import Case from 'case'
const originalToString = Object.prototype.toString
function isPlainObject (obj: any): boolean {
return originalToString.call(obj) === '[object Object]'
}
export function toCamel (data: any): any {
if (Array.isArray(data)) {
View highlight.js
import Prism from 'prismjs'
import loadLanguages from 'prismjs/components/index.js'
import path from 'path'
loadLanguages()
const languages = [
{ test: /\.(html|vue|xml)$/, lang: 'markup' },
{ test: /\.js$/, lang: 'javascript' },
{ test: /\.sh$/, lang: 'bash' },
@Akryum
Akryum / vue.config.js
Last active Apr 18, 2019
Use webpack-assets-manifest with Vue CLI 3
View vue.config.js
module.exports = {
chainWebpack: config => {
config
.plugin('manifest')
.use('webpack-assets-manifest', [{
publicPath: process.env.BASE_URL,
output: process.env.NODE_ENV === 'development' ? 'webpack.dev.manifest.json' : 'webpack.manifest.json',
writeToDisk: true,
}])
}
View schema.graphql
"""
Some user.
"""
type User implements Entity {
id: ID!
email: String!
organization: Organization!
"""
Teams of the user.
"""
@Akryum
Akryum / QuestionItem.vue
Last active Feb 7, 2019
Vue.js composition utils
View QuestionItem.vue
<template>
<DynamicScrollerItem
:item="item"
:active="active"
:size-dependencies="[
idState.answering,
data.answer,
isLiveAnswering,
]"
>
@Akryum
Akryum / preset.json
Last active Dec 30, 2018
Nodepack Preset
View preset.json
{
"name": "My preset",
"useConfigFiles": false,
"plugins": {
"@nodepack/plugin-babel": "^0.0.1",
"@nodepack/plugin-typescript": "^0.0.1"
},
"appMigrations": {
"@nodepack/plugin-typescript": {
"default-template@0.0.1": {
@Akryum
Akryum / vue.config.js
Created Sep 27, 2018
Per-page split chunks
View vue.config.js
module.exports = {
pages: {
pageA: 'src/pageA.js',
pageB: 'src/pageB.js',
pageC: 'src/pageC.js',
},
chainWebpack: config => {
const options = module.exports
const pages = options.pages
@Akryum
Akryum / main.js
Last active Sep 17, 2018
NativeScript Vue devtools example
View main.js
import Vue from 'nativescript-vue'
import router from './router'
import store from './store'
import devtools from '@vue/devtools'
// Prints Vue logs when --env.production is *NOT* set while building
Vue.config.silent = (TNS_ENV === 'production')
const app = new Vue({
router,
View BaseStackedView.vue
<script>
export default {
inheritAttrs: false,
props: {
index: {
type: [String, Number],
default: null,
},