Skip to content

Commit ff5f20e

Browse files
author
James Harris
committed
Gulp integration, begun layout of header. Created config file
1 parent 04fba48 commit ff5f20e

24 files changed

+523
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# jimmythecoder.github.io
2-
Dev website
2+
3+
UX Hypermedia creative

assets/Logo.sketch

336 KB
Binary file not shown.

assets/Photo.sketch

112 KB
Binary file not shown.

assets/Profile photo.psd

215 KB
Binary file not shown.

css/app.css

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulp-tasks/brower-sync.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = function (gulp, options, plugins) {
2+
'use strict';
3+
4+
const browserSync = require('browser-sync').create('sync-server');
5+
6+
gulp.task('browser-sync', function() {
7+
browserSync.init({
8+
server: {
9+
baseDir: "./"
10+
}
11+
});
12+
});
13+
};

gulp-tasks/default.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = function (gulp, options, plugins) {
2+
'use strict';
3+
4+
gulp.task('default', ['sass', 'typescript', 'watch'], function() {
5+
6+
});
7+
};

gulp-tasks/sass.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = function (gulp, options, plugins) {
2+
'use strict';
3+
4+
const sass = require('gulp-sass'),
5+
sourcemaps = require('gulp-sourcemaps'),
6+
browserSync = require("browser-sync").get('sync-server');
7+
8+
gulp.task('sass', function() {
9+
return gulp.src('./scss/app.scss')
10+
.pipe(sourcemaps.init())
11+
.pipe(sass().on('error', sass.logError))
12+
.pipe(sourcemaps.write())
13+
.pipe(gulp.dest('./css'))
14+
.pipe(browserSync.stream());
15+
});
16+
};

gulp-tasks/tslint.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = function (gulp, options, plugins) {
2+
'use strict';
3+
4+
const tslint = require("gulp-tslint"),
5+
fs = require("fs"),
6+
tsconfig = JSON.parse(fs.readFileSync('./tsconfig.json'));
7+
8+
//Check tsconfig.json for this tasks source config
9+
gulp.task('tslint', function() {
10+
return gulp.src(tsconfig.include)
11+
.pipe(tslint())
12+
.pipe(tslint.report())
13+
});
14+
};

gulp-tasks/typescript.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = function (gulp, options, plugins) {
2+
'use strict';
3+
4+
const ts = require('gulp-typescript'),
5+
notify = require('gulp-notify'),
6+
concat = require('gulp-concat'),
7+
sourcemaps = require('gulp-sourcemaps'),
8+
browserSync = require("browser-sync").get('sync-server'),
9+
tsProject = ts.createProject('./tsconfig.json');
10+
11+
//Check tsconfig.json for this tasks config
12+
gulp.task('typescript', ['tslint'], function() {
13+
var tsResult = tsProject.src()
14+
.pipe(sourcemaps.init())
15+
.pipe(tsProject())
16+
.on("error", notify.onError("<%= error.message %>"));
17+
18+
return tsResult.js
19+
.pipe(concat('app.js'))
20+
.pipe(sourcemaps.write())
21+
.pipe(gulp.dest('./js'))
22+
.pipe(browserSync.stream());
23+
});
24+
};

0 commit comments

Comments
 (0)