diff --git a/app/components/home.html b/app/components/home.html index 250ae65..bf358bf 100644 --- a/app/components/home.html +++ b/app/components/home.html @@ -1,6 +1,14 @@ -Home page. +
+

Home page.

-

-

-

\ No newline at end of file +

+

+

+ +

Main features

+ +
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..b0ef7f6 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" + "bootstrap": "~3.3.5", + "foundation": "~5.5.1", + "font-awesome": "~4.3.0" }, "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..0143ede 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -20,6 +20,11 @@ var paths = { scriptsDevServer: 'devServer/**/*.js' }; +var jsScriptsRegex = /.js$/i; +var cssStylesRegex = /.css$/i; +var lessStylesRegex = /.less$/i; +var fontsStylesRegex = /.(ttf|woff|eot|svg|woff2)$/i; + // == PIPE SEGMENTS ======== var pipes = {}; @@ -63,12 +68,18 @@ pipes.builtAppScriptsProd = function() { }; pipes.builtVendorScriptsDev = function() { - return gulp.src(bowerFiles()) + return gulp.src(bowerFiles({ + filter: function(e) { return jsScriptsRegex.test(e); } + }) + ) .pipe(gulp.dest('dist.dev/bower_components')); }; pipes.builtVendorScriptsProd = function() { - return gulp.src(bowerFiles()) + return gulp.src(bowerFiles({ + filter: function(e) { return jsScriptsRegex.test(e); } + }) + ) .pipe(pipes.orderedVendorScripts()) .pipe(plugins.concat('vendor.min.js')) .pipe(plugins.uglify()) @@ -107,6 +118,34 @@ pipes.builtStylesDev = function() { .pipe(gulp.dest(paths.distDev)); }; +pipes.buildVendorStylesLess = function() { + return gulp.src(bowerFiles({ + filter: function(e) { return lessStylesRegex.test(e); } + }) + ) + .pipe(plugins.less({ }) + ) +} + +pipes.builtVendorCssStyles = function() { + return gulp.src(bowerFiles({ + filter: function(e) { return cssStylesRegex.test(e); } + }) + ) +} + +pipes.builtVendorStylesDev = function() { + return es.merge( pipes.buildVendorStylesLess(), pipes.builtVendorCssStyles() ) + .pipe(gulp.dest(paths.distDev + "/styles" ) ); +} + +pipes.builtVendorStylesProd = function() { + return es.merge( pipes.buildVendorStylesLess(), pipes.builtVendorCssStyles() ) + .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 +156,25 @@ pipes.builtStylesProd = function() { .pipe(gulp.dest(paths.distProd)); }; +pipes.processedFonts = function(base_path) { + return gulp.src(bowerFiles({ + filter: function(e) { return fontsStylesRegex.test(e); } + }), + {base : 'bower_components'} + ) + .pipe(plugins.rename(function (path) { + var arrayPath = path.dirname.split("/"); + if (arrayPath.length > 1) { + arrayPath.splice(0,1); + new_path = "../" + arrayPath.join('/'); + } else { + new_path = "./" + } + path.dirname = new_path; + })) + .pipe(gulp.dest(base_path + "/styles")); +}; + pipes.processedImagesDev = function() { return gulp.src(paths.images) .pipe(gulp.dest(paths.distDev + '/images/')); @@ -142,12 +200,14 @@ pipes.builtIndexDev = function() { .pipe(pipes.orderedAppScripts()); var appStyles = pipes.builtStylesDev(); + var vendorStyles = pipes.builtVendorStylesDev(); return pipes.validatedIndex() .pipe(gulp.dest(paths.distDev)) // write first to get relative path for inject .pipe(plugins.inject(orderedVendorScripts, {relative: true, name: 'bower'})) .pipe(plugins.inject(orderedAppScripts, {relative: true})) .pipe(plugins.inject(appStyles, {relative: true})) + .pipe(plugins.inject(vendorStyles, {relative: true, name: 'bower'})) .pipe(gulp.dest(paths.distDev)); }; @@ -156,22 +216,24 @@ pipes.builtIndexProd = function() { var vendorScripts = pipes.builtVendorScriptsProd(); var appScripts = pipes.builtAppScriptsProd(); var appStyles = pipes.builtStylesProd(); + var vendorStyles = pipes.builtVendorStylesProd(); 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..8cd7673 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,13 @@ "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", "gulp-inject": "^1.1.1", "gulp-jshint": "^1.9.2", + "gulp-less": "^3.0.3", "gulp-livereload": "^3.7.0", "gulp-load-plugins": "^0.8.0", "gulp-minify-css": "^0.4.5", @@ -23,13 +25,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 +42,6 @@ "postinstall": "bower install", "prestart": "npm install", "start": "node server.js" - } + }, + "dependencies": {} }