Skip to content

Commit a980743

Browse files
Copy Bootstrap fonts to dist during build
1 parent e2e16f4 commit a980743

10 files changed

+303
-5
lines changed

Gruntfile.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ module.exports = function (grunt) {
55
grunt.loadNpmTasks('grunt-contrib-clean');
66
grunt.loadNpmTasks('grunt-contrib-watch');
77
grunt.loadNpmTasks('grunt-postcss');
8+
grunt.loadNpmTasks('grunt-contrib-copy');
89

910
// Project configuration.
1011
grunt.initConfig({
1112
pkg: grunt.file.readJSON('package.json'),
1213
buildDir: 'dist',
13-
outputFile: '<%= buildDir %>/csh-material-bootstrap.min.css',
14+
outputFile: '<%= buildDir %>/css/csh-material-bootstrap.min.css',
1415
banner: '/*!\n' +
1516
' * <%= pkg.name %> v<%= pkg.version %>\n' +
1617
' * Homepage: <%= pkg.homepage %>\n' +
@@ -20,7 +21,7 @@ module.exports = function (grunt) {
2021
'*/\n',
2122
clean: {
2223
all: {
23-
src: ['sass/build.scss', '<%= outputFile %>*']
24+
src: ['sass/build.scss', '<%= outputFile %>*', '<%= buildDir %>/fonts/*']
2425
},
2526
build: {
2627
src: ['sass/build.scss']
@@ -77,6 +78,14 @@ module.exports = function (grunt) {
7778
src: '<%= outputFile %>'
7879
}
7980
},
81+
copy: {
82+
fonts: {
83+
expand: true,
84+
cwd: 'bower_components/bootstrap-sass/assets',
85+
src: 'fonts/**',
86+
dest: '<%= buildDir %>'
87+
}
88+
},
8089
watch: {
8190
files: ['sass/csh-material-bootstrap.scss', 'sass/variables.scss', 'index.html'],
8291
tasks: 'build',
@@ -104,7 +113,7 @@ module.exports = function (grunt) {
104113
}
105114
});
106115

107-
grunt.registerTask('build', ['clean:all', 'concat', 'sass:dist', 'postcss', 'clean:build']);
116+
grunt.registerTask('build', ['clean:all', 'concat', 'sass:dist', 'postcss', 'clean:build', 'copy:fonts']);
108117

109118
grunt.event.on('watch', function (action) {
110119
var path = require('path');
@@ -113,4 +122,4 @@ module.exports = function (grunt) {
113122
grunt.registerTask('server', 'connect:keepalive');
114123

115124
grunt.registerTask('default', ['connect:base', 'watch']);
116-
};
125+
};

dist/csh-material-bootstrap.min.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

dist/css/csh-material-bootstrap.min.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
19.7 KB
Binary file not shown.

dist/fonts/bootstrap/glyphicons-halflings-regular.svg

Lines changed: 288 additions & 0 deletions
Loading
44.3 KB
Binary file not shown.
22.9 KB
Binary file not shown.
17.6 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"grunt-contrib-clean": "~0.5.0",
2020
"grunt-contrib-concat": "~0.3.0",
2121
"grunt-contrib-connect": "~0.8.0",
22+
"grunt-contrib-copy": "^1.0.0",
2223
"grunt-contrib-less": "~0.9.0",
2324
"grunt-contrib-sass": "~0.7.4",
2425
"grunt-contrib-watch": "~0.5.1",

0 commit comments

Comments
 (0)