completed the build system

async
Enrico Fasoli 2015-03-31 19:59:23 +02:00
parent 8848860014
commit 82c00c97f4
5 changed files with 38 additions and 22 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
bower_components/
.divshot-cache/
node_modules/
test/
dist/

4
divshot.json Normal file
View File

@ -0,0 +1,4 @@
{
"name": "pert",
"root": "dist"
}

View File

@ -6,7 +6,9 @@ var uglify = require('gulp-uglify')
var clean = require('gulp-clean')
gulp.task('css',function(){
return gulp.src('src/*.css')
cssFiles = ["src/*.css","bower_components/vis/dist/vis.min.css",
"bower_components/bootstrap/dist/css/bootstrap.css"]
return gulp.src(cssFiles)
.pipe(minifyCSS())
.pipe(gulp.dest('dist/'))
})
@ -16,7 +18,16 @@ gulp.task('html',function(){
.pipe(minifyHTML({ quotes: true }))
.pipe(gulp.dest('dist/'))
})
gulp.task('js',function(){
jsFiles = ["src/*.js",
"bower_components/jquery/dist/jquery.js",
"bower_components/angular/angular.js",
"bower_components/angular-ui-router/release/angular-ui-router.js",
"bower_components/vis/dist/vis.min.js"]
return gulp.src(jsFiles).pipe(uglify({ mangle: false }))
.pipe(gulp.dest('dist/'))
})
gulp.task('coffee',function(){
return gulp.src('src/*.coffee')
.pipe(coffee({ bare: true }))
@ -33,4 +44,4 @@ gulp.task('watch',function(){
gulp.watch('src/*.css',['css'])
gulp.watch('src/*.html',['html'])
})
gulp.task('default',['html','css','coffee'])
gulp.task('default',['html','css','js','coffee'])

View File

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html ng-app="pertApp">
<head>
<title>Pert</title>
<meta charset="utf-8">
<link rel="stylesheet" href="bower_components/vis/dist/vis.min.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="dist/style.css">
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/vis/dist/vis.min.js"></script>
<script src="dist/pert.js"></script>
<script src="dist/app.js"></script>
</head>
<body>
<div class="container" ui-view></div>
</body>
</html>

19
src/index.html Normal file
View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html ng-app="pertApp">
<head>
<title>Pert</title>
<meta charset="utf-8">
<link rel="stylesheet" href="dist/vis.min.css">
<link rel="stylesheet" href="dist/bootstrap.css">
<link rel="stylesheet" href="dist/style.css">
<script src="dist/jquery.js"></script>
<script src="dist/angular.js"></script>
<script src="dist/angular-ui-router.js"></script>
<script src="dist/vis.min.js"></script>
<script src="dist/pert.js"></script>
<script src="dist/app.js"></script>
</head>
<body>
<div class="container" ui-view></div>
</body>
</html>