Skip to content
This repository has been archived by the owner on Feb 19, 2018. It is now read-only.

Commit

Permalink
Remove uploading capabilities
Browse files Browse the repository at this point in the history
For more information see issue issue #3, for the tl;dr is that since I
don't use any of these options myself to publish sites and I have no way
of testing them each time I push changes I'm removing them due to the
headache it is to support them.
  • Loading branch information
sondr3 committed May 7, 2017
1 parent 728f6fc commit 82f2fe6
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 350 deletions.
8 changes: 0 additions & 8 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ module.exports = class extends Generator {
message: "What's your email?",
store: true
},
{
name: 'uploading',
type: 'list',
message: 'How do you want to upload your site?',
choices: ['Amazon S3', 'Rsync', 'Github Pages', 'None'],
store: true
},
{
name: 'babel',
type: 'confirm',
Expand Down Expand Up @@ -100,7 +93,6 @@ module.exports = class extends Generator {
this.composeWith(require.resolve('../git'));

this.composeWith(require.resolve('../gulp'), {
uploading: this.props.uploading,
babel: this.props.babel
});

Expand Down
58 changes: 0 additions & 58 deletions generators/gulp/aws.test.js

This file was deleted.

60 changes: 0 additions & 60 deletions generators/gulp/ghpages.test.js

This file was deleted.

22 changes: 0 additions & 22 deletions generators/gulp/gulp.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ beforeAll(() => {
name: pkg.name,
version: pkg.version,
'skip-install': true,
uploading: 'None',
babel: false
});
});
Expand All @@ -29,27 +28,6 @@ test('creates comment about creation', () => {
);
});

test('does not create credentials files', () => {
assert.noFile(['aws-credentials.json', 'rsync-credentials.json']);
});

test('does not contain uploading packages', () => {
assert.noJsonFileContent('package.json', {
devDependencies: {
'gulp-awspublish': '',
'gulp-babel': '',
'concurrent-transform': '',
'gulp-rsync': '',
'gulp-gh-pages': ''
}
});
});

test('does not contain deploy task', () => {
assert.noFileContent('gulpfile.js', "gulp.task('upload");
assert.noFileContent('gulpfile.js', "gulp.task('deploy");
});

test('contains default gulp tasks', () => {
[
'clean:assets',
Expand Down
38 changes: 0 additions & 38 deletions generators/gulp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ module.exports = class extends Generator {
constructor(args, options) {
super(args, options);

this.option('uploading', {
type: String,
required: true,
message: 'How do you want to upload your site?',
choices: ['Amazon S3', 'Rsync', 'Github Pages', 'None']
});

this.option('babel', {
type: String,
required: true
Expand Down Expand Up @@ -72,19 +65,6 @@ module.exports = class extends Generator {
pkg.devDependencies['gulp-babel'] = '^6.1.2';
}

if (this.options.uploading === 'Amazon S3') {
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.6';
}

if (this.options.uploading === 'Github Pages') {
pkg.devDependencies['gh-pages'] = '^0.11.0';
}

this.fs.writeJSON(this.destinationPath('package.json'), pkg);

this.fs.copyTpl(
Expand All @@ -95,26 +75,8 @@ module.exports = class extends Generator {
name: this.options.name,
version: this.options.version,
buildContent: this.options.buildContent,
amazonS3: this.options.uploading === 'Amazon S3',
rsync: this.options.uploading === 'Rsync',
ghpages: this.options.uploading === 'Github Pages',
noUpload: this.options.uploading === 'None',
babel: this.options.babel
}
);

if (this.options.uploading === 'Amazon S3') {
this.fs.copyTpl(
this.templatePath('aws-credentials.json'),
this.destinationPath('aws-credentials.json')
);
}

if (this.options.uploading === 'Rsync') {
this.fs.copyTpl(
this.templatePath('rsync-credentials.json'),
this.destinationPath('rsync-credentials.json')
);
}
}
};
38 changes: 0 additions & 38 deletions generators/gulp/no-upload.test.js

This file was deleted.

61 changes: 0 additions & 61 deletions generators/gulp/rsync.test.js

This file was deleted.

7 changes: 0 additions & 7 deletions generators/gulp/templates/aws-credentials.json

This file was deleted.

Loading

0 comments on commit 82f2fe6

Please sign in to comment.