Skip to content

Instantly share code, notes, and snippets.

@fabiofdsantos
Last active August 10, 2018 08:52
Show Gist options
  • Save fabiofdsantos/893ae06fda9472d90694bbf2f760e2e3 to your computer and use it in GitHub Desktop.
Save fabiofdsantos/893ae06fda9472d90694bbf2f760e2e3 to your computer and use it in GitHub Desktop.
[Integration] Install AdminLTE in Laravel 5.6
{
"directory": "./resources/assets/vendor"
}
{
"name": "l56",
"description": "",
"main": "",
"authors": [
"Teepluss <[email protected]>",
"Fábio Santos <[email protected]>"
],
"license": "MIT",
"homepage": "https://gist.github.com/fabiofdsantos/893ae06fda9472d90694bbf2f760e2e3",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"./resources/assets/vendor",
"test",
"tests"
],
"dependencies": {
"AdminLTE": "admin-lte#^2.3.6",
"font-awesome": "^4.6.3",
"Ionicons": "ionicons#^2.0.1",
"jquery": "^2.2.3",
"bootstrap": "^3.3.6"
}
}
npm install
bower install
npm run production
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
process.env.DISABLE_NOTIFIER = true;
let dirs = {
'vendor': "./resources/assets/vendor"
}
// Compile AdminLTE scripts to single file.
mix.scripts([
dirs.vendor + '/jquery/dist/jquery.js',
dirs.vendor + '/bootstrap/dist/js/bootstrap.js',
dirs.vendor + '/AdminLTE/plugins/fastclick/fastclick.js',
dirs.vendor + '/AdminLTE/dist/js/app.js',
dirs.vendor + '/AdminLTE/plugins/sparkline/jquery.sparkline.js',
dirs.vendor + '/AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js',
dirs.vendor + '/AdminLTE/plugins/jvectormap/jquery-jvectormap-world-mill-en.js',
dirs.vendor + '/AdminLTE/plugins/slimScroll/jquery.slimscroll.js',
dirs.vendor + '/AdminLTE/plugins/chartjs/Chart.js'
], 'public/js/admin.js');
// Compile AdminLTE to single file.
mix.styles([
dirs.vendor + '/bootstrap/dist/css/bootstrap.css',
dirs.vendor + '/font-awesome/css/font-awesome.css',
dirs.vendor + '/Ionicons/css/ionicons.css',
dirs.vendor + '/AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.css',
dirs.vendor + '/AdminLTE/dist/css/AdminLTE.css',
dirs.vendor + '/AdminLTE/dist/css/skins/all-skins.css'
], 'public/css/admin.css');
// Copy AdminLTE assets.
mix.copy(dirs.vendor + '/font-awesome/fonts', 'public/fonts')
.copy(dirs.vendor + '/Ionicons/fonts', 'public/fonts')
.copy(dirs.vendor + '/bootstrap/dist/fonts', 'public/fonts')
.copy(dirs.vendor + '/AdminLTE/dist/img', 'public/img');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment