diff --git a/.gitignore b/.gitignore index 31b4a8c5..d050aa4c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,6 @@ results node_modules npm-debug.log -build/app.js +build .DS_Store \ No newline at end of file diff --git a/build/.keep b/build/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/css/ascribe-fonts/Mercury_Light.otf b/fonts/Mercury_Light.otf similarity index 100% rename from css/ascribe-fonts/Mercury_Light.otf rename to fonts/Mercury_Light.otf diff --git a/css/ascribe-fonts/Mercury_Medium.otf b/fonts/Mercury_Medium.otf similarity index 100% rename from css/ascribe-fonts/Mercury_Medium.otf rename to fonts/Mercury_Medium.otf diff --git a/css/ascribe-fonts/Mercury_Regular.otf b/fonts/Mercury_Regular.otf similarity index 100% rename from css/ascribe-fonts/Mercury_Regular.otf rename to fonts/Mercury_Regular.otf diff --git a/css/ascribe-fonts/ascribe.eot b/fonts/ascribe.eot similarity index 100% rename from css/ascribe-fonts/ascribe.eot rename to fonts/ascribe.eot diff --git a/css/ascribe-fonts/ascribe.svg b/fonts/ascribe.svg similarity index 100% rename from css/ascribe-fonts/ascribe.svg rename to fonts/ascribe.svg diff --git a/css/ascribe-fonts/ascribe.ttf b/fonts/ascribe.ttf similarity index 100% rename from css/ascribe-fonts/ascribe.ttf rename to fonts/ascribe.ttf diff --git a/css/ascribe-fonts/ascribe.woff b/fonts/ascribe.woff similarity index 100% rename from css/ascribe-fonts/ascribe.woff rename to fonts/ascribe.woff diff --git a/css/ascribe-fonts/ascribe_logo.svg b/fonts/ascribe_logo.svg similarity index 100% rename from css/ascribe-fonts/ascribe_logo.svg rename to fonts/ascribe_logo.svg diff --git a/css/ascribe-fonts/ascribe_wortmarke_logo.svg b/fonts/ascribe_wortmarke_logo.svg similarity index 100% rename from css/ascribe-fonts/ascribe_wortmarke_logo.svg rename to fonts/ascribe_wortmarke_logo.svg diff --git a/css/ascribe-fonts/ascribe_wortmarke_logo_chunked.svg b/fonts/ascribe_wortmarke_logo_chunked.svg similarity index 100% rename from css/ascribe-fonts/ascribe_wortmarke_logo_chunked.svg rename to fonts/ascribe_wortmarke_logo_chunked.svg diff --git a/gulpfile.js b/gulpfile.js index 3b42e4de..a685ea56 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -9,13 +9,19 @@ var browserify = require('browserify'); var browserSync = require('browser-sync'); var babelify = require('babelify'); var notify = require('gulp-notify'); +var sass = require('gulp-sass'); +var concat = require('gulp-concat'); var _ = require('lodash'); - + +var config = { + bootstrapDir: './node_modules/bootstrap-sass' +}; + gulp.task('build', function() { bundle(false); }); -gulp.task('serve', ['browser-sync'], function() { +gulp.task('serve', ['browser-sync', 'sass', 'sass:watch', 'copy'], function() { bundle(true); }); @@ -28,6 +34,36 @@ gulp.task('browser-sync', function() { }); }); +gulp.task('sass', function () { + gulp.src('./sass/**/main.scss') + .pipe(sourcemaps.init()) + .pipe(sass({ + includePaths: [ + config.bootstrapDir + '/assets/stylesheets' + ] + }).on('error', sass.logError)) + .pipe(sourcemaps.write('./maps')) + .pipe(gulp.dest('./build/css')) + .pipe(browserSync.stream());; +}); + +gulp.task('sass:watch', function () { + gulp.watch('./sass/**/*.scss', ['sass']); +}); + +gulp.task('copy', function () { + var files = [ + './fonts/**/*', + './img/**/*' + ]; + + gulp.src(files, {base: './'}) + .pipe(gulp.dest('build')); + + gulp.src(config.bootstrapDir + '/assets/fonts/**/*') + .pipe(gulp.dest('./build/fonts')); +}); + function bundle(watch) { var bro; diff --git a/index.html b/index.html index 21dac715..4c875443 100644 --- a/index.html +++ b/index.html @@ -5,18 +5,12 @@