Skip to content

Commit

Permalink
ES6 migrate grunt (#1376)
Browse files Browse the repository at this point in the history
* migrated grunt/tasks

* migrated grunt/tasks

* clean up

* linting

* more linting

* proper linting

* Fix scripts grunt task

* code review
  • Loading branch information
herrmannplatz authored Jun 12, 2017
1 parent cc76fe0 commit 5a2e36d
Show file tree
Hide file tree
Showing 42 changed files with 1,313 additions and 1,123 deletions.
34 changes: 0 additions & 34 deletions grunt/config/aws_s3.coffee

This file was deleted.

40 changes: 40 additions & 0 deletions grunt/config/aws_s3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Wire
* Copyright (C) 2017 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*/

'use strict';

// https://github.com/MathieuLoutre/grunt-aws-s3

module.exports = {
default: {
files: [{
dest: '/<%= grunt.config("aws.deploy.options.version") %>.zip',
src: '<%= dir.aws.s3 %>/ebs.zip',
stream: true,
}],
options: {
bucket: 'wire-webapp',
},
},
options: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
region: 'eu-west-1',
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
},
};
31 changes: 0 additions & 31 deletions grunt/config/bower.coffee

This file was deleted.

39 changes: 39 additions & 0 deletions grunt/config/bower.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Wire
* Copyright (C) 2017 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*/

'use strict';

// https://github.com/yatskevich/grunt-bower-task

const path = require('path');

module.exports = {
install: {
options: {
layout(type, component) {
if (['js', '__untyped__'].includes(type)) {
return 'js';
}
return path.join(type, component);
},
targetDir: '<%= dir.app.ext %>',
verbose: true,
},
},
};
53 changes: 0 additions & 53 deletions grunt/config/clean.coffee

This file was deleted.

60 changes: 60 additions & 0 deletions grunt/config/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Wire
* Copyright (C) 2017 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*/

'use strict';

// https://github.com/gruntjs/grunt-contrib-clean


/* eslint sort-keys: "off"*/

module.exports = {
//##############################################################################
// Local/Test deployment related
//##############################################################################
dist: '<%= dir.dist %>',
dist_app: '<%= dir.dist %>/app',
docs: '<%= dir.docs %>',
docs_coverage: '<%= dir.docs.coverage %>',
ext: '<%= dir.app.ext %>/*',
temp: '<%= dir.temp %>',

//##############################################################################
// Production/Staging/Edge deployment related
//##############################################################################
deploy: '<%= dir.deploy %>',
deploy_app: '<%= dir.deploy %>/app',
deploy_script: [
'<%= dir.deploy %>/ext/js',
'<%= dir.deploy %>/script',
],
prod: [
'<%= dir.deploy %>/audio/buzzer',
'<%= dir.deploy %>/audio/digits',
'<%= dir.deploy %>/image/debug',
'<%= dir.deploy %>/min/*.map',
],

//##############################################################################
// Amazon Web Services related
//##############################################################################
aws: '<%= dir.aws.static %>',
aws_app: '<%= dir.aws.templates %>/app',
aws_s3: '<%= dir.aws.s3 %>',
};
42 changes: 0 additions & 42 deletions grunt/config/coffee.coffee

This file was deleted.

46 changes: 46 additions & 0 deletions grunt/config/coffee.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Wire
* Copyright (C) 2017 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*/

'use strict';

// https://github.com/gruntjs/grunt-contrib-coffee

module.exports = {
//##############################################################################
// Production/Staging/Edge deployment related
//##############################################################################
deploy: {
cwd: '<%= dir.app_ %>',
dest: '<%= dir.deploy %>',
expand: true,
ext: '.js',
src: '**/*.coffee',
},

//##############################################################################
// Local/Test deployment related
//##############################################################################
dist: {
cwd: '<%= dir.app_ %>',
dest: '<%= dir.dist %>',
expand: true,
ext: '.js',
src: '**/*.coffee',
},
};
26 changes: 0 additions & 26 deletions grunt/config/coffeelint.coffee

This file was deleted.

Loading

0 comments on commit 5a2e36d

Please sign in to comment.