diff --git a/app/components/home.html b/app/components/home.html index 250ae65..fc8fc63 100644 --- a/app/components/home.html +++ b/app/components/home.html @@ -3,4 +3,9 @@

-

\ No newline at end of file +

+ + + diff --git a/app/index.html b/app/index.html index 0612f0d..7d9a413 100644 --- a/app/index.html +++ b/app/index.html @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/bower.json b/bower.json index a71e622..2c1c3c7 100644 --- a/bower.json +++ b/bower.json @@ -7,7 +7,9 @@ "angular": "^1.3.12", "angular-ui-router": "^0.2.11", "angular-animate": "^1.3.0", - "foundation": "~5.5.1" + "foundation": "~5.5.1", + "angular-bootstrap": "~0.13.1", + "bootstrap-css": "~3.3.4" }, "devDependencies": { "angular-mocks": "^1.2.23" @@ -17,4 +19,4 @@ "main": "js/foundation.js" } } -} \ No newline at end of file +} diff --git a/gulpfile.js b/gulpfile.js index 0001e45..28709de 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -20,6 +20,9 @@ var paths = { scriptsDevServer: 'devServer/**/*.js' }; +var vendorScriptsRegex = /.js$/i; +var vendorStylesRegex = /.css$/i; + // == PIPE SEGMENTS ======== var pipes = {}; @@ -68,7 +71,10 @@ pipes.builtVendorScriptsDev = function() { }; pipes.builtVendorScriptsProd = function() { - return gulp.src(bowerFiles()) + return gulp.src(bowerFiles({ + filter: function(e) { return vendorScriptsRegex.test(e); } + }) + ) .pipe(pipes.orderedVendorScripts()) .pipe(plugins.concat('vendor.min.js')) .pipe(plugins.uglify()) @@ -107,6 +113,16 @@ pipes.builtStylesDev = function() { .pipe(gulp.dest(paths.distDev)); }; +pipes.builtVendorStyles = function() { + return gulp.src(bowerFiles({ + filter: function(e) { return vendorStylesRegex.test(e); } + }) + ) + .pipe(plugins.concat('vendor.min.css')) + .pipe(plugins.minifyCss()) + .pipe(gulp.dest(paths.distProd + "/styles")); +} + pipes.builtStylesProd = function() { return gulp.src(paths.styles) .pipe(plugins.sourcemaps.init()) @@ -117,6 +133,14 @@ pipes.builtStylesProd = function() { .pipe(gulp.dest(paths.distProd)); }; +pipes.processedFonts = function(base_path) { + return gulp.src('./bower_components/**/*.{ttf,woff,eof,svg,woff2}') + .pipe(plugins.rename(function (path) { + path.dirname = "/"; + })) + .pipe(gulp.dest(base_path + '/fonts')); +}; + pipes.processedImagesDev = function() { return gulp.src(paths.images) .pipe(gulp.dest(paths.distDev + '/images/')); @@ -156,22 +180,24 @@ pipes.builtIndexProd = function() { var vendorScripts = pipes.builtVendorScriptsProd(); var appScripts = pipes.builtAppScriptsProd(); var appStyles = pipes.builtStylesProd(); + var vendorStyles = pipes.builtVendorStyles(); return pipes.validatedIndex() .pipe(gulp.dest(paths.distProd)) // write first to get relative path for inject .pipe(plugins.inject(vendorScripts, {relative: true, name: 'bower'})) .pipe(plugins.inject(appScripts, {relative: true})) .pipe(plugins.inject(appStyles, {relative: true})) + .pipe(plugins.inject(vendorStyles, {relative: true, name: 'bower'})) .pipe(plugins.htmlmin({collapseWhitespace: true, removeComments: true})) .pipe(gulp.dest(paths.distProd)); }; pipes.builtAppDev = function() { - return es.merge(pipes.builtIndexDev(), pipes.builtPartialsDev(), pipes.processedImagesDev()); + return es.merge(pipes.builtIndexDev(), pipes.builtPartialsDev(), pipes.processedFonts(paths.distDev), pipes.processedImagesDev()); }; pipes.builtAppProd = function() { - return es.merge(pipes.builtIndexProd(), pipes.processedImagesProd()); + return es.merge(pipes.builtIndexProd(), pipes.processedFonts(paths.distProd), pipes.processedImagesProd()); }; // == TASKS ======== diff --git a/package.json b/package.json index 17c00d3..b1f9377 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "express": "^4.7.2", "gulp": "^3.8.10", "gulp-angular-filesort": "^1.0.4", + "gulp-bower-assets": "0.0.3", "gulp-concat": "^2.4.3", "gulp-htmlhint": "0.0.9", "gulp-htmlmin": "^1.0.0", @@ -23,13 +24,13 @@ "gulp-nodemon": "^1.0.5", "gulp-order": "^1.1.1", "gulp-print": "^1.1.0", - "gulp-rename": "^1.2.0", + "gulp-rename": "^1.2.2", "gulp-sass": "^1.3.2", "gulp-sourcemaps": "^1.3.0", "gulp-uglify": "^1.1.0", "jshint-stylish": "^1.0.0", - "karma": "^0.10", - "karma-junit-reporter": "^0.2.2", + "karma": "^0.13.3", + "karma-junit-reporter": "^0.3.3", "main-bower-files": "^2.5.0", "method-override": "^2.1.2", "protractor": "^1.1.1", @@ -40,5 +41,6 @@ "postinstall": "bower install", "prestart": "npm install", "start": "node server.js" - } + }, + "dependencies": {} }