mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add bootstrap to scss build
This commit is contained in:
parent
8bc0d5640d
commit
e08528a9c5
5
docs/tools/package-lock.json
generated
5
docs/tools/package-lock.json
generated
@ -1674,6 +1674,11 @@
|
||||
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
|
||||
"dev": true
|
||||
},
|
||||
"bootstrap": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz",
|
||||
"integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA=="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
|
@ -25,6 +25,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"amphtml-validator": "^1.0.35",
|
||||
"bootstrap": "^4.4.1",
|
||||
"purify-css": "^1.2.5"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
const path = require('path');
|
||||
const scssPath = path.resolve(__dirname, '../../website/src/scss');
|
||||
|
||||
console.log(path.resolve(__dirname, 'node_modules/bootstrap', require('bootstrap/package.json').sass));
|
||||
|
||||
module.exports = {
|
||||
|
||||
@ -9,7 +12,8 @@ module.exports = {
|
||||
}),
|
||||
|
||||
entry: [
|
||||
'../../website/src/scss/main.scss',
|
||||
path.resolve(scssPath, 'bootstrap.scss'),
|
||||
path.resolve(scssPath, 'main.scss'),
|
||||
],
|
||||
|
||||
output: {
|
||||
@ -17,6 +21,12 @@ module.exports = {
|
||||
filename: 'js/main.js',
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
bootstrap: path.resolve(__dirname, 'node_modules/bootstrap', require('bootstrap/package.json').sass),
|
||||
},
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.js$/,
|
||||
@ -32,9 +42,15 @@ module.exports = {
|
||||
use: [{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: 'main.css',
|
||||
outputPath: './css',
|
||||
sourceMap: true,
|
||||
outputPath: (url, entryPath, context) => {
|
||||
if (0 === entryPath.indexOf(scssPath)) {
|
||||
const outputFile = entryPath.slice(entryPath.lastIndexOf('/') + 1, -5)
|
||||
const outputPath = entryPath.slice(0, entryPath.lastIndexOf('/')).slice(scssPath.length + 1)
|
||||
return `./css/${outputPath}/${outputFile}.css`
|
||||
}
|
||||
return `./css/${url}`
|
||||
},
|
||||
},
|
||||
}, {
|
||||
loader: 'postcss-loader',
|
||||
|
3127
website/css/bootstrap.css
vendored
3127
website/css/bootstrap.css
vendored
File diff suppressed because it is too large
Load Diff
1
website/src/scss/bootstrap.scss
vendored
Normal file
1
website/src/scss/bootstrap.scss
vendored
Normal file
@ -0,0 +1 @@
|
||||
@import '~bootstrap';
|
Loading…
Reference in New Issue
Block a user