Skip to content

Instantly share code, notes, and snippets.

Avatar
💚
RIP IE

Guillaume Chau Akryum

💚
RIP IE
View GitHub Profile
@Akryum
Akryum / style.styl
Created Jun 9, 2018
Vue cli-ui plugin dark mode
View style.styl
@import '~@vue/cli-ui/src/style/imports'
.my-class
background $vue-ui-color-light-neutral
.vue-ui-dark-mode &
background $vue-ui-color-dark
View main.backup.js
// Existing imports
import Vue from 'vue'
import router from './router'
import store from './store'
// Other existing code here
// Add 'app' variable
const app = new Vue({
// Existing options
View CHANGELOG.md

3.0.0-rc.3 (2018-06-18)

cli

Bug Fixes

  • invoke: deep merge only plain objects (a7f3c2c)
  • invoke: merge data in config transforms (35cb714)
  • invoke: not reading dot files (49d56db)
  • better version check, closes #1564 (8b9477f)
@Akryum
Akryum / vue.config.js
Last active Apr 26, 2020
Auto-import styles with vue-cli 3
View vue.config.js
const path = require('path')
module.exports = {
chainWebpack: config => {
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => addStyleResource(config.module.rule('stylus').oneOf(type)))
},
}
function addStyleResource (rule) {
View BaseStackedView.vue
<script>
export default {
inheritAttrs: false,
props: {
index: {
type: [String, Number],
default: null,
},
@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,
@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 / 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 / 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,
]"
>
View schema.graphql
"""
Some user.
"""
type User implements Entity {
id: ID!
email: String!
organization: Organization!
"""
Teams of the user.
"""