Simplify JavaScript dependencies

This commit is contained in:
Jonathan Reinink 2019-12-18 13:48:33 -05:00
parent 2e7d59613a
commit 6f9c5f1366
7 changed files with 799 additions and 745 deletions

1493
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,12 @@
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@inertiajs/inertia": "^0.1.0",
"@inertiajs/inertia-vue": "^0.1.0",
"autosize": "^4.0.2",
"axios": "^0.18",
"cross-env": "^5.1",
"eslint": "^5.14.1",
"eslint-plugin-vue": "^5.2.2",
"fuse.js": "^3.4.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"popper.js": "^1.12",
@ -28,9 +25,7 @@
"resolve-url-loader": "^2.3.1",
"tailwindcss": "^0.7.4",
"vue": "^2.6.6",
"vue-meta": "^2.2.2",
"vue-template-compiler": "^2.6.6"
},
"dependencies": {
"vue-meta": "^2.2.2"
}
}

View File

@ -63,11 +63,13 @@
</template>
<script>
import _ from 'lodash'
import Icon from '@/Shared/Icon'
import Layout from '@/Shared/Layout'
import mapValues from 'lodash/mapValues'
import Pagination from '@/Shared/Pagination'
import pickBy from 'lodash/pickBy'
import SearchFilter from '@/Shared/SearchFilter'
import throttle from 'lodash/throttle'
export default {
metaInfo: { title: 'Contacts' },
@ -91,8 +93,8 @@ export default {
},
watch: {
form: {
handler: _.throttle(function() {
let query = _.pickBy(this.form)
handler: throttle(function() {
let query = pickBy(this.form)
this.$inertia.replace(this.route('contacts', Object.keys(query).length ? query : { remember: 'forget' }))
}, 150),
deep: true,
@ -100,7 +102,7 @@ export default {
},
methods: {
reset() {
this.form = _.mapValues(this.form, () => null)
this.form = mapValues(this.form, () => null)
},
},
}

View File

@ -55,11 +55,13 @@
</template>
<script>
import _ from 'lodash'
import Icon from '@/Shared/Icon'
import Layout from '@/Shared/Layout'
import mapValues from 'lodash/mapValues'
import Pagination from '@/Shared/Pagination'
import pickBy from 'lodash/pickBy'
import SearchFilter from '@/Shared/SearchFilter'
import throttle from 'lodash/throttle'
export default {
metaInfo: { title: 'Organizations' },
@ -83,8 +85,8 @@ export default {
},
watch: {
form: {
handler: _.throttle(function() {
let query = _.pickBy(this.form)
handler: throttle(function() {
let query = pickBy(this.form)
this.$inertia.replace(this.route('organizations', Object.keys(query).length ? query : { remember: 'forget' }))
}, 150),
deep: true,
@ -92,7 +94,7 @@ export default {
},
methods: {
reset() {
this.form = _.mapValues(this.form, () => null)
this.form = mapValues(this.form, () => null)
},
},
}

View File

@ -61,10 +61,12 @@
</template>
<script>
import _ from 'lodash'
import Icon from '@/Shared/Icon'
import Layout from '@/Shared/Layout'
import mapValues from 'lodash/mapValues'
import pickBy from 'lodash/pickBy'
import SearchFilter from '@/Shared/SearchFilter'
import throttle from 'lodash/throttle'
export default {
metaInfo: { title: 'Users' },
@ -88,8 +90,8 @@ export default {
},
watch: {
form: {
handler: _.throttle(function() {
let query = _.pickBy(this.form)
handler: throttle(function() {
let query = pickBy(this.form)
this.$inertia.replace(this.route('users', Object.keys(query).length ? query : { remember: 'forget' }))
}, 150),
deep: true,
@ -97,7 +99,7 @@ export default {
},
methods: {
reset() {
this.form = _.mapValues(this.form, () => null)
this.form = mapValues(this.form, () => null)
},
},
}

View File

@ -7,8 +7,6 @@
</template>
<script>
import autosize from 'autosize'
export default {
inheritAttrs: false,
props: {
@ -24,15 +22,6 @@ export default {
type: Array,
default: () => [],
},
autosize: {
type: Boolean,
default: false,
},
},
mounted() {
if (this.autosize) {
autosize(this.$refs.input)
}
},
methods: {
focus() {

3
webpack.mix.js vendored
View File

@ -30,8 +30,5 @@ mix.js('resources/js/app.js', 'public/js')
},
},
})
.babelConfig({
plugins: ['@babel/plugin-syntax-dynamic-import'],
})
.version()
.sourceMaps()