Browse Source

bootstrap in webpack script loader

experimental
Paweł Jedwabny 4 years ago
parent
commit
c8fc52d1e7
2 changed files with 3 additions and 3 deletions
  1. +1
    -2
      index.php
  2. +2
    -1
      src/index.js

+ 1
- 2
index.php View File

@@ -62,10 +62,9 @@ ob_start();
<?php
ini_set('include_path', 'libs/minify' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . 'libs' . PATH_SEPARATOR . ini_get('include_path'));
require_once('Minify/Build.php');
$bootstrap = DEBUG_JS ? 'vendor/bower-asset/gentelella/vendors/bootstrap/dist/js/bootstrap.js' : 'vendor/bower-asset/gentelella/vendors/bootstrap/dist/js/bootstrap.min.js';
$select2 = DEBUG_JS ? 'vendor/bower-asset/gentelella/vendors/select2/dist/js/select2.js' : 'vendor/bower-asset/gentelella/vendors/select2/dist/js/select2.min.js';
$jquery_ui = DEBUG_JS ? 'libs/jquery-ui-1.12.1.custom.js':'libs/jquery-ui-1.12.1.custom.min.js';
$jses = array('dist/index.js', $bootstrap, 'libs/jquery-ui-1.12.1.custom.min.js', 'libs/jquery.clonePosition.js', $select2,'libs/Chart.js');
$jses = array('dist/index.js', 'libs/jquery-ui-1.12.1.custom.min.js', 'libs/jquery.clonePosition.js', $select2,'libs/Chart.js');
if(!DEBUG_JS) {
$jsses_build = new Minify_Build($jses);
$jsses_src = $jsses_build->uri('serve.php?' . http_build_query(array('f' => array_values($jses))));


+ 2
- 1
src/index.js View File

@@ -1,5 +1,6 @@
import jQuery from '../vendor/bower-asset/gentelella/vendors/jquery/dist/jquery.js'
import 'script-loader!../vendor/bower-asset/gentelella/vendors/jquery/dist/jquery.js'
import 'script-loader!../libs/HistoryKeeper.js';
import 'script-loader!../vendor/bower-asset/gentelella/vendors/bootstrap/dist/js/bootstrap.js';

import Epesi from './epesi';



Loading…
Cancel
Save