Skip to content

Commit 7269b89

Browse files
committed
fix(build): fix travis build (add bootswatch / bootstrap fonts workaround)
1 parent f597d8f commit 7269b89

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ language: node_js
22
node_js:
33
- "4.1"
44
script:
5-
- bash cp -rf ./node_modules/bootswatch/bower_components/bootstrap/dist/fonts/ ./node_modules/bootswatch/ #workaround
65
- npm run ci
76
- bash ./.travis-deploy.sh

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,4 @@ The main concept at the core of all Flux implementations is that the data must a
5050

5151
### How to run the project
5252
1. `npm i`
53-
2. `npm i bootstrap` then copy `bootstrap/dist/fonts` into `bootswatch/` (workaround)
54-
3. `npm start`
53+
2. `npm start`

webpack.config.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var DEFAULT_PARAMS = {
3737
inject: 'body'
3838
}),
3939
new webpack.optimize.DedupePlugin()
40-
],
40+
].concat(_bootswatchWorkaround()),
4141
devServer: {
4242
contentBase: 'dev/',
4343
port: 8081
@@ -111,3 +111,13 @@ function _mergeArraysCustomizer(a, b) {
111111
return a.concat(b);
112112
}
113113
}
114+
115+
function _bootswatchWorkaround() {
116+
var extensions = ['eot', 'woff', 'woff2', 'ttf', 'svg'];
117+
118+
return extensions.map(function(ext) {
119+
var regexp = new RegExp('\.\.\/fonts\/glyphicons-halflings-regular\.' + ext + '$');
120+
var dest = 'bootswatch/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.' + ext;
121+
return new webpack.NormalModuleReplacementPlugin(regexp, dest);
122+
});
123+
}

0 commit comments

Comments
 (0)