Browse Source

use npm bootstrap

experimental
Paweł Jedwabny 4 years ago
parent
commit
e93922b3b9
4 changed files with 19 additions and 2 deletions
  1. +1
    -1
      index.php
  2. +4
    -0
      package.json
  3. +3
    -1
      src/index.js
  4. +11
    -0
      webpack.config.js

+ 1
- 1
index.php View File

@@ -61,7 +61,7 @@ ob_start();
<meta name="robots" content="NOINDEX, NOARCHIVE">
<script type='text/javascript' src='dist/index.js'></script>
<?php
$csses = array('libs/jquery-ui-1.12.1.custom.min.css', 'vendor/bower-asset/gentelella/vendors/bootstrap/dist/css/bootstrap.css', 'vendor/bower-asset/gentelella/build/css/custom.css','vendor/bower-asset/gentelella/vendors/select2/dist/css/select2.css','vendor/bower-asset/gentelella/vendors/font-awesome/css/font-awesome.min.css');
$csses = array('libs/jquery-ui-1.12.1.custom.min.css', 'vendor/bower-asset/gentelella/build/css/custom.css','vendor/bower-asset/gentelella/vendors/select2/dist/css/select2.css','vendor/bower-asset/gentelella/vendors/font-awesome/css/font-awesome.min.css');
foreach($csses as $css)
print('<link href="'.$css.'" rel="stylesheet" type="text/css">');
?>


+ 4
- 0
package.json View File

@@ -24,11 +24,15 @@
"css-loader": "^0.28.7",
"expose-loader": "^0.7.3",
"file-loader": "^0.11.2",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"resolve-url-loader": "^2.1.0",
"script-loader": "^0.7.1",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9"
},
"dependencies": {
"bootstrap": "^3.3.7",
"jquery": "^2.x.x"
}
}

+ 3
- 1
src/index.js View File

@@ -1,7 +1,9 @@
import jQuery from 'expose-loader?jq!expose-loader?jQuery!expose-loader?$!jquery';

import 'bootstrap';
import 'bootstrap/less/bootstrap.less';

import 'script-loader!../libs/HistoryKeeper.js';
import 'script-loader!../vendor/bower-asset/gentelella/vendors/bootstrap/dist/js/bootstrap.js';
import 'script-loader!../vendor/bower-asset/gentelella/vendors/select2/dist/js/select2.js';
import 'script-loader!../libs/jquery-ui-1.12.1.custom.min.js';
import 'script-loader!../libs/jquery.clonePosition.js';


+ 11
- 0
webpack.config.js View File

@@ -4,5 +4,16 @@ module.exports = {
output: {
path: __dirname + "/dist",
filename: "index.js"
},
module: {
loaders: [
{test: /bootstrap\/js\//, loader: 'imports?jQuery=jquery' },
{test: /\.less$/, loader: 'style-loader!css-loader!less-loader'},
{test: /\.css$/, loader: 'style-loader!css-loader'},
{test: /\.woff(2)?(\?v=\d+\.\d+\.\d+)?$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" },
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url-loader?limit=10000&mimetype=application/octet-stream" },
{test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file-loader" },
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url-loader?limit=10000&mimetype=image/svg+xml" }
]
}
};

Loading…
Cancel
Save