Browse Source

adminlte路径优化

jqh 5 years ago
parent
commit
4938fb034d

+ 0 - 14
resources/assets/adminlte/config/postcss.config.js

@@ -1,14 +0,0 @@
-'use strict'
-
-module.exports = (ctx) => ({
-  map: ctx.file.dirname.includes('examples') ? false : {
-    inline: false,
-    annotation: true,
-    sourcesContent: true
-  },
-  plugins: {
-    autoprefixer: {
-      cascade: false
-    }
-  }
-})

+ 0 - 29
resources/assets/adminlte/config/rollup.config.js

@@ -1,29 +0,0 @@
-import babel from 'rollup-plugin-babel'
-
-const pkg  = require('../../package')
-const year = new Date().getFullYear()
-
-const globals = {
-  jquery: 'jQuery'
-}
-
-export default {
-  input  : 'build/js/AdminLTE.js',
-  output : {
-    banner: `/*!
- * AdminLTE v${pkg.version} (${pkg.homepage})
- * Copyright 2014-${year} ${pkg.author}
- * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
- */`,
-    file  : 'dist/js/adminlte.js',
-    format: 'umd',
-    globals,
-    name  : 'adminlte'
-  },
-  plugins: [
-    babel({
-      exclude: 'node_modules/**',
-      externalHelpers: true
-    })
-  ]
-}

+ 5 - 5
src/Layout/Asset.php

@@ -23,12 +23,12 @@ class Asset
      * @var array
      */
     protected $alias = [
-        '@AdminLTE' => [
+        '@adminlte' => [
             'js' => [
-                '@admin/AdminLTE/js/adminlte.js',
+                '@admin/adminlte/adminlte.js',
             ],
             'css' => [
-                '@admin/AdminLTE/css/adminlte.css',
+                '@admin/adminlte/adminlte.css',
             ],
         ],
         '@nunito' => [
@@ -206,7 +206,7 @@ class Asset
      * @var array
      */
     public $baseCss = [
-        'AdminLTE'    => '@AdminLTE',
+        'adminlte'    => '@adminlte',
         'vendors'     => '@vendors',
         'toastr'      => '@toastr',
         'datatables'  => '@datatables',
@@ -219,7 +219,7 @@ class Asset
      * @var array
      */
     public $baseJs = [
-        'AdminLTE'  => '@AdminLTE',
+        'adminlte'  => '@adminlte',
         'toastr'    => '@toastr',
         'pjax'      => '@pjax',
         'validator' => '@validator',

+ 3 - 3
webpack.mix.js

@@ -41,9 +41,9 @@ mix.copyDirectory('resources/assets/images', distPath + '/images');
 mix.copyDirectory('resources/assets/fonts', distPath + '/fonts');
 mix.copyDirectory('resources/assets/vendors', distPath + '/vendors');
 
-// adminlte
-mix.sass('resources/assets/adminlte/scss/AdminLTE.scss', distPath + '/AdminLTE/css/adminlte.css');
-mix.js('resources/assets/adminlte/js/AdminLTE.js', distPath + '/AdminLTE/js/adminlte.js');
+// AdminLTE3.0
+mix.sass('resources/assets/adminlte/scss/AdminLTE.scss', distPath + '/adminlte/adminlte.css');
+mix.js('resources/assets/adminlte/js/AdminLTE.js', distPath + '/adminlte/adminlte.js');
 
 // ------------------------------------ Dcat Admin -------------------------------------------
 function dcatPath(path) {