selectItem (item) { | |
if (!this.multiple) { | |
this.inputValue = item | |
} else { | |
if (this.inputValue === null) { | |
this.inputValue = [item] | |
} else { | |
const i = this.inputValue.findIndex(i => this.getValue(i) === this.getValue(item)) | |
if (i !== -1) { |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
Many of us building single-page apps today use JavaScript module bundling tools that trend towards a monolithic "bundle.js" file including the full app and vendor code for multiple routes. This means if a user lands on any arbitrary route they need to wait for a large bundle of JS to be fetched, parsed and executed before the application is fully rendered and interactive.
This is a little backwards, especially when apps are used under real-world network (3G) and device
<template lang="pug"> | |
li(@click='$store.commit("UPDATE_SIDE_NAV_ACTIVE_ITEM", $el)') | |
slot | |
</template> | |
<script> | |
export default { | |
data () { | |
return { | |
provideData: { |
class Auto { | |
constructor(data) { | |
this.make = data.make; | |
this.model = data.model; | |
this.year = data.year; | |
this.price = data.price; | |
} | |
getDetails() { | |
return `${this.year} ${this.make} ${this.model}`; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script data-main="usage" src="http://requirejs.org/docs/release/1.0.8/comments/require.js"></script> | |
</head> | |
<body> | |
<p>Check your JavaScript console for output!</p> | |
</body> | |
</head> |
https://regex101.com/ https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285
\('.+'\)\.foobar
\('[A-z_\-.]*'\)\.foobar