Upgrade frontend.

This commit is contained in:
James Cole
2021-04-02 22:33:31 +02:00
parent 6d979a68f2
commit 71785bae57
38 changed files with 1579 additions and 37121 deletions

View File

@@ -1,27 +1,19 @@
const mix = require('laravel-mix');
/*
* webpack.mix.js
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
const mix = require('laravel-mix');
require('laravel-mix-bundle-analyzer');
// production
// require('laravel-mix-bundle-analyzer');
mix.webpackConfig({
resolve: {
alias: {
@@ -30,50 +22,35 @@ mix.webpackConfig({
}
});
mix
// AUTO LOAD
// .autoload({
// jquery: ['$', 'window.jQuery','jQuery']
// })
// MIX IN CLASSIC SCRIPT
// .babel([
// '../resources/assets/js/v2/classic/adminlte.js',
// ], 'public/v2/js/classic.js')
// MIX IN CLASSIC SCRIPT
// .scripts([
// '../resources/assets/js/v2/classic/adminlte.js',
// ], 'public/v2/js/classic.js')
// COPY SCRIPT
//.copy('../resources/assets/js/v2/classic/adminlte.js', 'public/v2/js/classic.js')
// misc pages
.js('src/pages/dashboard.js', 'public/js')
.js('src/pages/empty.js', 'public/js')
.js('src/pages/new-user/index.js', 'public/js/new-user')
// accounts.
.js('src/pages/accounts/index.js', 'public/js/accounts')
.js('src/pages/accounts/show.js', 'public/js/accounts')
// transactions.
.js('src/pages/transactions/create.js', 'public/js/transactions')
.js('src/pages/transactions/edit.js', 'public/js/transactions')
// register page
.js('src/pages/register.js', 'public/js')
.extract().sourceMaps()
.sass('src/app.scss', 'public/css')
// move to right dir
.copy('public/js','../public/v2/js')
// dashboard and empty page
mix.js('src/pages/dashboard.js', 'public/js').vue();
// accounts.
mix.js('src/pages/accounts/index.js', 'public/js/accounts').vue();
mix.js('src/pages/accounts/show.js', 'public/js/accounts').vue();
// transactions.
mix.js('src/pages/transactions/create.js', 'public/js/transactions')
mix.js('src/pages/transactions/edit.js', 'public/js/transactions')
// static pages
mix.js('src/pages/empty.js', 'public/js').vue();
mix.js('src/pages/register.js', 'public/js')
mix.extract().sourceMaps();
mix.sass('src/app.scss', 'public/css', [
//
]);
// move to right dir
mix.copy('public/js','../public/v2/js')
.copy('fonts','../public/fonts')
.copy('images','../public/images')
.copy('public/css','../public/v2/css')
;
.copy('public/css','../public/v2/css');