Skip to content

Commit

Permalink
Update packages, fix testing for versions
Browse files Browse the repository at this point in the history
When checking that a package isn't installed you don't need a to check
for a version, only that the package doesn't exist. Also helps making
upading packages and their tests a lot easier.
  • Loading branch information
sondr3 committed May 27, 2016
1 parent 0415f99 commit 5acea64
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
12 changes: 6 additions & 6 deletions generators/gulp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ module.exports = generators.Base.extend({
'gulp-cssnano': '^2.1.0',
'gulp-eslint': '^2.0.0',
'gulp-gzip': '^1.1.0',
'gulp-htmlmin': '^1.3.0',
'gulp-htmlmin': '^2.0.0',
'gulp-if': '^2.0.0',
'gulp-imagemin': '^2.1.0',
'gulp-imagemin': '^3.0.0',
'gulp-inject': '^4.0.0',
'gulp-load-plugins': '^1.2.0',
'gulp-newer': '^1.1.0',
Expand All @@ -58,17 +58,17 @@ module.exports = generators.Base.extend({
'gulp-sourcemaps': '^1.3.0',
'gulp-uglify': '^1.5.1',
'gulp-uncss': '^1.0.0',
'shelljs': '^0.6.0',
'yargs': '^4.3.2'
'shelljs': '^0.7.0',
'yargs': '^4.7.0'
});

if (this.options.uploading === 'Amazon S3') {
pkg.devDependencies['gulp-awspublish'] = '^3.0.1';
pkg.devDependencies['gulp-awspublish'] = '^3.2.0';
pkg.devDependencies['concurrent-transform'] = '^1.0.0';
}

if (this.options.uploading === 'Rsync') {
pkg.devDependencies['gulp-rsync'] = '^0.0.5';
pkg.devDependencies['gulp-rsync'] = '^0.0.6';
}

if (this.options.uploading === 'Github Pages') {
Expand Down
4 changes: 2 additions & 2 deletions generators/gulp/templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ gulp.task('inject:footer', () =>
gulp.task('images', () =>
gulp.src('src/assets/images/**/*')
.pipe($.cache($.imagemin({
progressive: true,
interlaced: true
imagemin.gifsicle({interlaced: true}),
imagemin.mozjpeg({progressive: true})
})))
.pipe(gulp.dest('.tmp/assets/images'))
.pipe($.size({title: 'images'}))
Expand Down
16 changes: 8 additions & 8 deletions test/gulp.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ test('package.json contains correct packages', () => {
'gulp-cssnano': '^2.1.0',
'gulp-eslint': '^2.0.0',
'gulp-gzip': '^1.1.0',
'gulp-htmlmin': '^1.3.0',
'gulp-htmlmin': '^2.0.0',
'gulp-if': '^2.0.0',
'gulp-imagemin': '^2.1.0',
'gulp-imagemin': '^3.0.0',
'gulp-inject': '^4.0.0',
'gulp-load-plugins': '^1.2.0',
'gulp-newer': '^1.1.0',
Expand All @@ -44,8 +44,8 @@ test('package.json contains correct packages', () => {
'gulp-sourcemaps': '^1.3.0',
'gulp-uglify': '^1.5.1',
'gulp-uncss': '^1.0.0',
'shelljs': '^0.6.0',
'yargs': '^4.3.2'
'shelljs': '^0.7.0',
'yargs': '^4.7.0'
}
});
});
Expand All @@ -60,10 +60,10 @@ test('does not create credentials files', () => {
test('does not contain uploading packages', () => {
assert.noJSONFileContent('package.json', {
devDependencies: {
'gulp-awspublish': '^3.0.1',
'concurrent-transform': '^1.0.0',
'gulp-rsync': '^0.0.5',
'gulp-gh-pages': '^0.5.2'
'gulp-awspublish': '',
'concurrent-transform': '',
'gulp-rsync': '',
'gulp-gh-pages': ''
}
});
});
Expand Down
6 changes: 3 additions & 3 deletions test/uploading/aws.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test('creates package.json file', () => {
test('contain correct uploading packages', () => {
assert.JSONFileContent('package.json', {
devDependencies: {
'gulp-awspublish': '^3.0.1',
'gulp-awspublish': '^3.2.0',
'concurrent-transform': '^1.0.0'
}
});
Expand All @@ -30,8 +30,8 @@ test('contain correct uploading packages', () => {
test('does not contain wrong uploading packages', () => {
assert.noJSONFileContent('package.json', {
devDependencies: {
'gulp-rsync': '^0.0.5',
'gulp-gh-pages': '^0.5.2'
'gulp-rsync': '',
'gulp-gh-pages': ''
}
});
});
Expand Down
6 changes: 3 additions & 3 deletions test/uploading/ghpages.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ test('contain correct uploading packages', () => {
test('does not contain wrong uploading packages', () => {
assert.noJSONFileContent('package.json', {
devDependencies: {
'gulp-awspublish': '^3.0.1',
'concurrent-transform': '^1.0.0',
'gulp-rsync': '^0.0.5'
'gulp-awspublish': '',
'concurrent-transform': '',
'gulp-rsync': ''
}
});
});
Expand Down
8 changes: 4 additions & 4 deletions test/uploading/no-uploading.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ test('does not create credentials files', () => {
test('does not contain uploading packages', () => {
assert.noJSONFileContent('package.json', {
devDependencies: {
'gulp-awspublish': '^3.0.1',
'concurrent-transform': '^1.0.0',
'gulp-rsync': '^0.0.5',
'gulp-gh-pages': '^0.5.2'
'gulp-awspublish': '',
'concurrent-transform': '',
'gulp-rsync': '',
'gulp-gh-pages': ''
}
});
});
Expand Down
8 changes: 4 additions & 4 deletions test/uploading/rsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ test('creates package.json file', () => {
test('contain correct uploading packages', () => {
assert.JSONFileContent('package.json', {
devDependencies: {
'gulp-rsync': '^0.0.5'
'gulp-rsync': '^0.0.6'
}
});
});

test('does not contain wrong uploading packages', () => {
assert.noJSONFileContent('package.json', {
devDependencies: {
'gulp-awspublish': '^3.0.1',
'concurrent-transform': '^1.0.0',
'gulp-gh-pages': '^0.5.2'
'gulp-awspublish': '',
'concurrent-transform': '',
'gulp-gh-pages': ''
}
});
});
Expand Down

0 comments on commit 5acea64

Please sign in to comment.