2017-12-29 07:29:00 +08:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-03-14 22:07:41 +08:00
|
|
|
'use strict'
|
2017-12-08 08:43:09 +08:00
|
|
|
|
2018-03-14 22:07:41 +08:00
|
|
|
const mix = require('laravel-mix')
|
|
|
|
const webpack = require('webpack')
|
2017-12-28 07:20:34 +08:00
|
|
|
|
|
|
|
mix.webpackConfig({
|
2018-03-14 22:07:41 +08:00
|
|
|
plugins: [
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
$: 'jquery',
|
|
|
|
jQuery: 'jquery'
|
|
|
|
})
|
|
|
|
]
|
|
|
|
})
|
2017-12-08 08:43:09 +08:00
|
|
|
|
2017-12-31 02:03:45 +08:00
|
|
|
/**
|
|
|
|
* GENERAL FILES
|
|
|
|
*/
|
|
|
|
|
2018-03-14 22:07:41 +08:00
|
|
|
mix.copy('node_modules/bootstrap3/fonts/*.woff2', 'public/assets/fonts/')
|
|
|
|
mix.copy('node_modules/bootstrap3/fonts/*.woff2', 'public/assets/admin/fonts/')
|
|
|
|
mix.copy('node_modules/icheck/icheck.js', 'public/assets/admin/js/')
|
|
|
|
mix.copy('node_modules/x-editable/dist/bootstrap3-editable/js/*', 'public/assets/admin/js/')
|
|
|
|
mix.copy('node_modules/x-editable/dist/bootstrap3-editable/img/*', 'public/assets/admin/img/')
|
2017-12-31 02:03:45 +08:00
|
|
|
|
2017-12-28 08:08:37 +08:00
|
|
|
/**
|
|
|
|
* ADMIN REQUIRED FILES
|
|
|
|
*/
|
|
|
|
|
2017-12-17 05:12:44 +08:00
|
|
|
mix.sass('public/assets/admin/vendor/sass/paper-dashboard.scss',
|
2018-03-14 22:07:41 +08:00
|
|
|
'public/assets/admin/vendor/paper-dashboard.css')
|
|
|
|
.sourceMaps()
|
2017-12-28 06:51:56 +08:00
|
|
|
|
|
|
|
mix.styles([
|
2018-03-14 22:07:41 +08:00
|
|
|
'node_modules/bootstrap3/dist/css/bootstrap.css',
|
|
|
|
'public/assets/admin/vendor/animate.css',
|
|
|
|
'node_modules/select2/dist/css/select2.css',
|
|
|
|
'node_modules/leaflet/dist/leaflet.css',
|
|
|
|
'node_modules/icheck/skins/square/blue.css',
|
|
|
|
'node_modules/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css',
|
|
|
|
'public/assets/admin/vendor/paper-dashboard.css',
|
|
|
|
'node_modules/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css',
|
2017-12-29 07:29:00 +08:00
|
|
|
], 'public/assets/admin/css/vendor.min.css').version()
|
2018-03-14 22:07:41 +08:00
|
|
|
.sourceMaps()
|
2017-12-28 08:08:37 +08:00
|
|
|
|
|
|
|
mix.scripts([
|
2018-03-14 22:07:41 +08:00
|
|
|
'node_modules/lodash/lodash.js',
|
|
|
|
'node_modules/moment/moment.js',
|
|
|
|
'node_modules/axios/dist/axios.js',
|
|
|
|
'node_modules/bootstrap3/dist/js/bootstrap.js',
|
|
|
|
'node_modules/bootstrap3/js/collapse.js',
|
|
|
|
'node_modules/bootstrap3/js/transition.js',
|
|
|
|
'node_modules/popper.js/dist/umd/popper.js',
|
|
|
|
'node_modules/popper.js/dist/umd/popper-utils.js',
|
|
|
|
'node_modules/select2/dist/js/select2.js',
|
|
|
|
'node_modules/leaflet/dist/leaflet.js',
|
|
|
|
'node_modules/icheck/icheck.js',
|
|
|
|
'node_modules/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.js',
|
|
|
|
'node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js',
|
|
|
|
'node_modules/jquery-pjax/jquery.pjax.js',
|
|
|
|
], 'public/assets/admin/js/vendor.js')
|
|
|
|
|
|
|
|
mix.copy('node_modules/icheck/skins/square/blue*.png', 'public/assets/admin/css')
|
2017-12-31 00:38:18 +08:00
|
|
|
|
2017-12-28 08:08:37 +08:00
|
|
|
/**
|
2018-01-10 08:49:15 +08:00
|
|
|
* SYSTEM REQUIRED AND GLOBAL VENDOR FILES
|
2017-12-28 08:08:37 +08:00
|
|
|
*/
|
|
|
|
|
2018-03-14 22:07:41 +08:00
|
|
|
mix.copy('node_modules/jquery/dist/jquery.js', 'public/assets/system/js/')
|
|
|
|
mix.copy('node_modules/flag-icon-css/flags/', 'public/assets/system/flags/')
|
2018-01-10 08:49:15 +08:00
|
|
|
|
2017-12-28 07:20:34 +08:00
|
|
|
mix.autoload({
|
2018-03-14 22:07:41 +08:00
|
|
|
'jquery': ['jQuery', '$'],
|
|
|
|
})
|
2017-12-28 07:20:34 +08:00
|
|
|
|
2017-12-28 07:24:54 +08:00
|
|
|
mix.scripts([
|
2018-03-14 22:07:41 +08:00
|
|
|
'node_modules/lodash/lodash.js',
|
|
|
|
'node_modules/axios/dist/axios.js',
|
|
|
|
'node_modules/jquery/dist/jquery.js',
|
|
|
|
'node_modules/bootstrap3/dist/js/bootstrap.js',
|
|
|
|
'node_modules/popper.js/dist/umd/popper.js',
|
|
|
|
'node_modules/popper.js/dist/umd/popper-utils.js',
|
|
|
|
'node_modules/select2/dist/js/select2.js',
|
|
|
|
'node_modules/leaflet/dist/leaflet.js',
|
|
|
|
'node_modules/pjax/pjax.js',
|
|
|
|
'node_modules/leaflet-rotatedmarker/leaflet.rotatedMarker.js',
|
|
|
|
'node_modules/Leaflet.Geodesic/Leaflet.Geodesic.js',
|
|
|
|
], 'public/assets/system/js/vendor.js')
|
2017-12-28 08:08:37 +08:00
|
|
|
|
|
|
|
mix.styles([
|
2018-03-14 22:07:41 +08:00
|
|
|
'node_modules/select2/dist/css/select2.css',
|
|
|
|
'node_modules/leaflet/dist/leaflet.css',
|
|
|
|
'node_modules/flag-icon-css/css/flag-icon.css',
|
|
|
|
'public/assets/admin/vendor/pe-icon-7-stroke.css',
|
2018-02-23 03:28:12 +08:00
|
|
|
], 'public/assets/system/css/vendor.min.css')
|
2018-03-14 22:07:41 +08:00
|
|
|
.options({
|
|
|
|
compressed: true
|
|
|
|
})
|
|
|
|
.sourceMaps()
|
2017-12-28 08:08:37 +08:00
|
|
|
|
2017-12-30 06:56:46 +08:00
|
|
|
/**
|
|
|
|
* INSTALLER VENDOR FILES
|
|
|
|
*/
|
|
|
|
|
2018-02-13 00:51:04 +08:00
|
|
|
mix.styles([
|
2018-03-14 22:07:41 +08:00
|
|
|
'node_modules/select2/dist/css/select2.css',
|
|
|
|
'node_modules/flag-icon-css/css/flag-icon.css',
|
2018-02-13 00:51:04 +08:00
|
|
|
], 'public/assets/system/css/installer.css')
|
2018-03-14 22:07:41 +08:00
|
|
|
.options({
|
|
|
|
processCssUrls: false,
|
|
|
|
compressed: true
|
|
|
|
})
|
|
|
|
.sourceMaps()
|
2018-02-13 00:51:04 +08:00
|
|
|
|
2017-12-30 06:56:46 +08:00
|
|
|
mix.scripts([
|
2018-03-14 22:07:41 +08:00
|
|
|
'node_modules/lodash/lodash.js',
|
|
|
|
'node_modules/jquery/dist/jquery.js',
|
|
|
|
'node_modules/pjax/pjax.js',
|
|
|
|
'node_modules/select2/dist/js/select2.js',
|
|
|
|
], 'public/assets/system/js/installer-vendor.js')
|
2017-12-30 06:56:46 +08:00
|
|
|
|
2017-12-28 08:08:37 +08:00
|
|
|
/**
|
|
|
|
* DEFAULT SKIN FRONTEND FILES
|
|
|
|
*/
|
2017-12-28 07:20:34 +08:00
|
|
|
|
2017-12-25 02:10:51 +08:00
|
|
|
mix.sass('public/assets/frontend/sass/now-ui-kit.scss',
|
2018-03-14 22:07:41 +08:00
|
|
|
'public/assets/frontend/css/now-ui-kit.css')
|
|
|
|
.options({
|
|
|
|
processCssUrls: false,
|
|
|
|
compressed: true
|
|
|
|
})
|
|
|
|
.sourceMaps()
|
2018-03-13 06:30:52 +08:00
|
|
|
|
|
|
|
// These should go into the separate vendor.js file
|
|
|
|
const extract = [
|
2018-03-14 22:07:41 +08:00
|
|
|
'lodash',
|
|
|
|
'popper.js',
|
|
|
|
'jquery',
|
|
|
|
'select2',
|
|
|
|
'pjax',
|
|
|
|
'leaflet',
|
|
|
|
'Leaflet.Geodesic',
|
|
|
|
'leaflet-rotatedmarker'
|
|
|
|
]
|
2018-03-13 06:30:52 +08:00
|
|
|
|
|
|
|
mix.js('resources/js/frontend/app.js', 'public/js/frontend')
|
2018-03-14 22:07:41 +08:00
|
|
|
.extract(extract)
|
2018-03-13 06:30:52 +08:00
|
|
|
|
2018-03-14 22:07:41 +08:00
|
|
|
//mix.js('resources/js/admin/app.js', 'public/js/admin')
|