Last active
July 18, 2016 20:29
-
-
Save chbaranowski/d50bcb687342d8fce51e9467a0f0f2a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "example-angularjs-gulp", | |
"ignore": [ | |
"**/.*", | |
"node_modules", | |
"bower_components", | |
"test", | |
"tests" | |
], | |
"dependencies": { | |
"bootstrap": "^3.3.6" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var browserSync = require('browser-sync').create(); | |
var reload = browserSync.reload; | |
var proxy = require('http-proxy-middleware'); | |
var $ = require('gulp-load-plugins')(); | |
gulp.task('html', function() { | |
return gulp.src('app/*.html') | |
.pipe(gulp.dest('./dist')); | |
}); | |
gulp.task('sass', function () { | |
return gulp.src('./styles/**/*.scss') | |
.pipe($.sass().on('error', $.sass.logError)) | |
.pipe(gulp.dest('./dist/css')) | |
.pipe(reload({ stream: true })); | |
}); | |
gulp.task('fonts', function() { | |
gulp.src(['./bower_components/bootstrap/dist/fonts/*.{ttf,woff,eof,eot,svg}']) | |
.pipe(gulp.dest('./dist/fonts')); | |
}); | |
gulp.task('build', ['fonts', 'sass', 'html' ]) | |
gulp.task('serve', ['build' ], function() { | |
browserSync.init({ | |
open : false, | |
server : { | |
baseDir : "./dist", | |
middleware : [ proxy('/rest', { | |
target : 'http://localhost:8080', | |
ws : true | |
}) ] | |
} | |
}); | |
gulp.watch('./styles/**/*.scss', [ 'sass' ]); | |
gulp.watch('app/*.html', [ 'html' ]); | |
gulp.watch('dist/*.html').on('change', reload); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "example-angularjs-gulp", | |
"version": "1.0.0", | |
"author": "Christian Baranowski", | |
"license": "ASL", | |
"devDependencies": { | |
"browser-sync": "^2.13.0", | |
"del": "^2.2.1", | |
"gulp": "^3.9.1", | |
"gulp-load-plugins": "^1.2.4", | |
"gulp-minify-css": "^1.2.4", | |
"gulp-sass": "^2.3.2", | |
"http-proxy-middleware": "^0.17.0", | |
"run-sequence": "^1.2.2" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.github.tux2323</groupId> | |
<artifactId>dashboard-ui</artifactId> | |
<version>0.1.0</version> | |
<packaging>jar</packaging> | |
<build> | |
<resources> | |
<resource> | |
<directory>dist</directory> | |
<targetPath>static</targetPath> | |
</resource> | |
</resources> | |
<plugins> | |
<plugin> | |
<groupId>com.github.eirslett</groupId> | |
<artifactId>frontend-maven-plugin</artifactId> | |
<version>1.0</version> | |
<executions> | |
<execution> | |
<id>install node and npm</id> | |
<goals> | |
<goal>install-node-and-npm</goal> | |
</goals> | |
<configuration> | |
<nodeVersion>v5.3.0</nodeVersion> | |
<npmVersion>3.3.12</npmVersion> | |
</configuration> | |
</execution> | |
<execution> | |
<id>npm install</id> | |
<goals> | |
<goal>npm</goal> | |
</goals> | |
<configuration> | |
<arguments>install</arguments> | |
</configuration> | |
</execution> | |
<execution> | |
<id>gulp build</id> | |
<goals> | |
<goal>gulp</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment