Skip to content

Commit

Permalink
Fixed paths and order of tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisnyman committed Nov 12, 2015
1 parent baa44ee commit 3ad8c54
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ pip-log.txt
cores.db
app/data/company_infos.yml
app/data/company_mapping.yml
tmp/
2 changes: 1 addition & 1 deletion app/bin/companies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
i = 1;
lastOrder = -1;
lastMentions = 0;
file = file = File.read('../../dist/data.json')
file = file = File.read('../../tmp/data.json')
data = JSON.parse(file)
contributors = data['contributors']
companies = Hash.new(0)
Expand Down
2 changes: 1 addition & 1 deletion app/bin/cores.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
lastOrder = -1;
lastMentions = 0;

file = file = File.read('../../dist/data.json')
file = file = File.read('../../tmp/data.json')
data = JSON.parse(file)
contributors = data['contributors']
sum = contributors.values.reduce(:+).to_f
Expand Down
24 changes: 12 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ gulp.task('drupalcore', function () {
});

// Build contributors page
gulp.task('buildcontributors', ['buildjson'], function () {
gulp.task('buildcontributors', function () {
return gulp.src('')
.pipe(shell(['./cores.rb > ../../tmp/index.html'], { 'cwd': './app/bin'}));
});

// Build companies page
gulp.task('buildcompanies', ['buildjson'], function () {
gulp.task('buildcompanies', function () {
return gulp.src('')
.pipe(shell(['./companies.rb > ../../tmp/companies.html'], { 'cwd': './app/bin'}));
});
Expand Down Expand Up @@ -84,33 +84,33 @@ gulp.task('cleantmp', function(cb) {

// Copy tmp to dist
gulp.task('copytmpdist', function(cb) {
return gulp.src(['tmp/**/*'])
.pipe(gulp.dest('dist'));
return gulp.src(['./tmp/**/*'])
.pipe(gulp.dest('./dist'));
});

// Copy all javascripts
gulp.task('javascripts', ['cleantmp'], function() {
gulp.task('javascripts', function() {
return gulp.src(paths.scripts)
.pipe(gulp.dest('dist/js'));
.pipe(gulp.dest('tmp/js'));
});

// Copy all static images
gulp.task('images', ['cleantmp'], function() {
gulp.task('images', function() {
return gulp.src(paths.images)
// Pass in options to the task
.pipe(imagemin({optimizationLevel: 5}))
.pipe(gulp.dest('dist/images'));
.pipe(gulp.dest('tmp/images'));
});

// Compile Sass
gulp.task('sass', ['cleantmp'], function () {
gulp.task('sass', function() {
return gulp.src(paths.scss)
.pipe(sass())
.pipe(gulp.dest('dist/css'));
.pipe(gulp.dest('./tmp/css'));
});

// Parse the html for groups of assets and compress
gulp.task('usemin', function () {
gulp.task('usemin', ['sass', 'javascripts'], function () {
return gulp.src('./tmp/*.html')
.pipe(usemin({
js: [uglify()],
Expand All @@ -134,7 +134,7 @@ gulp.task('minifyhtml', function() {

gulp.src('./tmp/*.html')
.pipe(minifyHTML(opts))
.pipe(gulp.dest('./tmp/'));
.pipe(gulp.dest('./tmp'));
});

// The whole shebang
Expand Down

0 comments on commit 3ad8c54

Please sign in to comment.