Skip to content

Commit c06d63f

Browse files
committedSep 5, 2015
Basic gulp
1 parent 69b4a92 commit c06d63f

File tree

5 files changed

+84
-0
lines changed

5 files changed

+84
-0
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.css
2+
node_modules/

‎app/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<html>
2+
<head>
3+
<title> Flarior </title>
4+
<link href="/css/bla.css" rel="stylesheet">
5+
</head>
6+
<body>
7+
<h1>Hello World</h1>
8+
sadjaksdak
9+
</body>
10+
</html>

‎app/sass/bla.scss

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$font-stack: Helvatica, sans-serif;
2+
$primary-color: #fff;
3+
4+
h1 {
5+
font: 100% $font-stack;
6+
color: $primary-color;
7+
background-color: red;
8+
}

‎gulpfile.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
var path = require('path');
2+
3+
global.gulp = require('gulp');
4+
var webserver = require('gulp-webserver');
5+
var sass = require('gulp-sass');
6+
7+
global.flariorPaths = {
8+
app : path.resolve('./app/'),
9+
sass : path.resolve('./app/sass'),
10+
sassGlob: path.resolve('./app/sass/**/*.scss'),
11+
css: path.resolve('./app/css')
12+
}
13+
14+
gulp.task('webserver',['sass', 'watch'], function() {
15+
gulp.src(flariorPaths.app)
16+
.pipe(webserver({
17+
host: '0.0.0.0',
18+
port: 8000,
19+
livereload: true
20+
}));
21+
});
22+
23+
24+
25+
gulp.task('sass', function compileInuit(){
26+
gulp.src(flariorPaths.sassGlob)
27+
.pipe(sass({
28+
errLogToConsole: true
29+
}))
30+
.pipe(gulp.dest('./app/css'))
31+
});
32+
33+
gulp.task('watch', function(){
34+
gulp.watch(flariorPaths.sassGlob, ['sass']);
35+
});
36+
37+
gulp.task('default', ['webserver']);

‎package.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "flarior-frontend",
3+
"version": "0.0.1",
4+
"description": "Flarior frontend",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/flarior/flarior-frontend.git"
12+
},
13+
"author": "",
14+
"license": "GPL-3.0",
15+
"bugs": {
16+
"url": "https://github.com/flarior/flarior-frontend/issues"
17+
},
18+
"homepage": "https://github.com/flarior/flarior-frontend#readme",
19+
"dependencies": {
20+
"gulp": "^3.9.0",
21+
"gulp-dest": "^0.2.2",
22+
"gulp-sass": "^2.0.4",
23+
"gulp-sourcemaps": "^1.5.2",
24+
"gulp-webserver": "^0.9.1",
25+
"inuit-starter-kit": "^0.2.9"
26+
}
27+
}

0 commit comments

Comments
 (0)
Please sign in to comment.