Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Fix tasks in Gruntfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
willmendesneto committed Jan 18, 2015
1 parent 1b68b80 commit b186a82
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 55 deletions.
61 changes: 59 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,23 @@ module.exports = function (grunt) {
dist: ['<%= yeoman.dist %>/*.html']
},

rsync: {
options: {
args: ['--verbose'],
exclude: ['.git*','*.scss','node_modules'],
recursive: true
},
prod: {
options: {
src: '<%= yeoman.dist %>/',
dest: '/home/linguagil/linguagil.com.br/',
host: '[email protected]',
syncDestIgnoreExcl: true
}
}
},


// Allow the use of non-minsafe AngularJS files. Automatically makes it
// minsafe compatible so Uglify does not destroy the ng references
ngAnnotate: {
Expand Down Expand Up @@ -374,7 +391,7 @@ module.exports = function (grunt) {

grunt.registerTask('modifyImageLinkInScript', 'Task for replace image link in script file.', function(filename, imageTarget) {
var fs = require('fs'),
SCRIPTS_DIST_DIR = 'dist/js',
SCRIPTS_DIST_DIR = 'dist/scripts',
IMAGE_DIST_DIR = 'dist/images',
oldestImage = imageTarget
;
Expand All @@ -398,6 +415,32 @@ module.exports = function (grunt) {

});

grunt.registerTask('modifyImageLinkInStyles', 'Task for replace image link in stylesheet file.', function(filename, imageTarget) {
var fs = require('fs'),
STYLES_DIST_DIR = 'dist/styles',
IMAGE_DIST_DIR = 'dist/images',
oldestImage = imageTarget
;

fs.readdirSync(STYLES_DIST_DIR).forEach(function(file) {
if ( file.indexOf(filename) !== (-1) ) {
filename = STYLES_DIST_DIR+'/'+file;
}
});

fs.readdirSync(IMAGE_DIST_DIR).forEach(function(file) {
if ( file.indexOf(oldestImage) !== (-1) ) {
imageTarget = file;
}
});

var data = fs.readFileSync(filename, 'utf8');
data = data.replace(new RegExp(oldestImage, 'g'), imageTarget);

fs.writeFileSync(filename, data, 'utf8');

});

grunt.registerTask('serve', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
Expand Down Expand Up @@ -442,12 +485,26 @@ module.exports = function (grunt) {
'rev',
'usemin',
'htmlmin',
'modifyImageLinkInScript:scripts.js:pin.png'
'modifyImageLinkInScript:scripts.js:pin.png',
'modifyImageLinkInStyles:main.css:home-background.jpg'
]);

grunt.registerTask('default', [
'newer:jshint',
'test',
'build'
]);

grunt.registerTask('travis', [
'bower-install',
'jshint',
'build',
'htmllint:dist'
]);

grunt.registerTask('deploy', [
'travis',
'rsync:prod'
]);

};
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
landing-page
LinguÁgil 2015
============
[![Build Status](https://drone.io/github.com/linguagil/landing-page/status.png)](https://drone.io/github.com/linguagil/landing-page/latest)
[![Build Status](https://travis-ci.org/linguagil/landing-page.png)](https://travis-ci.org/linguagil/landing-page)

[![Build Status](https://drone.io/github.com/linguagil/2015.linguagil.com.br/status.png)](https://drone.io/github.com/linguagil/2015.linguagil.com.br/latest)
[![Build Status](https://travis-ci.org/linguagil/2015.linguagil.com.br.png)](https://travis-ci.org/linguagil/2015.linguagil.com.br)

Landing Page do LinguÁgil.

Expand Down Expand Up @@ -30,7 +29,7 @@ bower install

### Outros pacotes

Instale o resto que está descrito no package.json.
Instale o resto que está descrito no package.json.

```
npm install
Expand Down
2 changes: 1 addition & 1 deletion app/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013 LinguÁgil
Copyright (c) 2013-2015 LinguÁgil

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
8 changes: 4 additions & 4 deletions app/codigo-de-conduta.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css" />
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet">
<!-- build:css({.tmp,app}) css/main.css -->
<!-- build:css({.tmp,app}) styles/main.css -->
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css"/>

<link rel="stylesheet" href="bower_components/mediaelement/build/mediaelementplayer.min.css"/>
Expand Down Expand Up @@ -138,15 +138,15 @@ <h3 class="col-md-12 col-lg-12 col-xs-12 col-sm-12 text-center"><span class="par
<a href="#top" data-animation="scroll"><i class="fa fa-circle-arrow-up scroll fa-4x"></i></a>
</div>
<hr>
<p>Copyright &copy; Grupo LinguÁgil 2015</p>
<p>Copyright &copy; Grupo LinguÁgil 2013-2015</p>
</div>
</div>
</div>
</footer>
<!-- /Footer -->

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<!-- build:js js/plugins.js -->
<!-- build:js scripts/plugins.js -->
<script type="text/javascript" src="bower_components/fastclick/lib/fastclick.js"></script>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
Expand All @@ -160,7 +160,7 @@ <h3 class="col-md-12 col-lg-12 col-xs-12 col-sm-12 text-center"><span class="par
<script type="text/javascript" src="bower_components/gmaps/gmaps.js"></script>
<!-- endbuild -->

<!-- build:js({.tmp,app}) js/scripts.js -->
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/main.js"></script>
<!-- endbuild -->

Expand Down
10 changes: 5 additions & 5 deletions app/eventos-anteriores.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css" />
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet">
<!-- build:css({.tmp,app}) css/main.css -->
<!-- build:css({.tmp,app}) styles/main.css -->
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css"/>

<link rel="stylesheet" href="bower_components/mediaelement/build/mediaelementplayer.min.css"/>
Expand Down Expand Up @@ -54,7 +54,7 @@
<!-- /Side Menu -->

<!-- Full Page Image Header Area -->
<div id="top" class="header conduct-code">
<div id="top" class="header conduct-code" >
<div class="vert-text">
<h1><img src="images/linguagil-logo.png" width="350" height="178" alt="Linguágil 2015" /></h1>
<h2><span class="parallax-text square-reticle">Eventos anteriores</span></h2>
Expand Down Expand Up @@ -195,15 +195,15 @@ <h3 class="col-md-12 col-lg-12 col-xs-12 col-sm-12 text-center"><span class="par
<a href="#top" data-animation="scroll"><i class="fa fa-circle-arrow-up scroll fa-4x"></i></a>
</div>
<hr>
<p>Copyright &copy; Grupo LinguÁgil 2015</p>
<p>Copyright &copy; Grupo LinguÁgil 2013-2015</p>
</div>
</div>
</div>
</footer>
<!-- /Footer -->

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<!-- build:js js/plugins.js -->
<!-- build:js scripts/plugins.js -->
<script type="text/javascript" src="bower_components/fastclick/lib/fastclick.js"></script>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
Expand All @@ -217,7 +217,7 @@ <h3 class="col-md-12 col-lg-12 col-xs-12 col-sm-12 text-center"><span class="par
<script type="text/javascript" src="bower_components/gmaps/gmaps.js"></script>
<!-- endbuild -->

<!-- build:js({.tmp,app}) js/scripts.js -->
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/main.js"></script>
<!-- endbuild -->

Expand Down
12 changes: 6 additions & 6 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css" />
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet">
<!-- build:css({.tmp,app}) css/main.css -->
<!-- build:css({.tmp,app}) styles/main.css -->
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css"/>

<link rel="stylesheet" href="bower_components/mediaelement/build/mediaelementplayer.min.css"/>
Expand Down Expand Up @@ -47,7 +47,7 @@
<li><a href="programacao.html">Programação</a></li>
<li><a href="eventos-anteriores.html">Eventos anteriores</a></li>
<li><a href="videos.html">Vídeos</a></li>
<li><a data-animation="scroll" href="#registration">Inscrição</a></li>
<li><a data-animation="scroll" href="#registration">Inscrições</a></li>
<li><a data-animation="scroll" href="#location">Localização</a></li>
</ul>
</div>
Expand Down Expand Up @@ -162,7 +162,7 @@ <h2>Inscrições</h2>
<div class="row">
<div class="col-md-10 col-md-offset-1 text-center">
<a href="https://eventioz.com.br/e/linguagil-2015" class="btn btn-default btn-lg btn-danger btn-registration-form">Inscreva-se no LinguÁgil 2015</a>
<iframe id="iframe-inscricao" class="registration-form" src="https://eventioz.com.br/e/linguagil-2015/registrations/new?iframe=" width="600" height="1000" frameborder="0" scrolling="yes" style="width:600;height:1000;border:none; "></iframe>
<iframe id="iframe-inscricao" class="registration-form" src="https://eventioz.com.br/e/linguagil-2015/registrations/new?iframe=" width="600" height="1000" style="width:600;height:1000;border:none; "></iframe>

</div>
</div>
Expand Down Expand Up @@ -257,15 +257,15 @@ <h3 class="col-md-12 col-lg-12 col-xs-12 col-sm-12 text-center"><span class="par
<a href="#top" data-animation="scroll"><i class="fa fa-circle-arrow-up scroll fa-4x"></i></a>
</div>
<hr>
<p>Copyright &copy; Grupo LinguÁgil 2015</p>
<p>Copyright &copy; Grupo LinguÁgil 2013-2015</p>
</div>
</div>
</div>
</footer>
<!-- /Footer -->

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<!-- build:js js/plugins.js -->
<!-- build:js scripts/plugins.js -->
<script type="text/javascript" src="bower_components/fastclick/lib/fastclick.js"></script>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
Expand All @@ -279,7 +279,7 @@ <h3 class="col-md-12 col-lg-12 col-xs-12 col-sm-12 text-center"><span class="par
<script type="text/javascript" src="bower_components/gmaps/gmaps.js"></script>
<!-- endbuild -->

<!-- build:js({.tmp,app}) js/scripts.js -->
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/main.js"></script>
<!-- endbuild -->

Expand Down
Loading

0 comments on commit b186a82

Please sign in to comment.