Skip to content

Commit 77c1a9b

Browse files
committed
Reorganizing javascript and minifying
1 parent a9c173d commit 77c1a9b

10 files changed

+56
-14
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77

88
### Jekyll ###
99
_site/
10+
11+
### Node ###
12+
node_modules/

_layouts/default.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,8 @@
2222

2323
{% include footer.html %}
2424
</div>
25-
26-
<script src="js/jquery-2.1.1.min.js"></script>
27-
<script src="js/showRoom.js"></script>
28-
<script src="js/TweenMax.min.js"></script>
29-
<script src="js/throttle-debounce.js"></script>
30-
<script src="js/showRoom.js"></script>
31-
<script src="js/smooth-scroll.js"></script>
25+
26+
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
27+
<script src="js/main.js"></script>
3228
</body>
3329
</html>

gulpfile.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Call Plugins
2+
var gulp = require('gulp'),
3+
uglify = require('gulp-uglify'),
4+
concat = require('gulp-concat');
5+
6+
// Call Uglify and Concat JS
7+
gulp.task('js', function(){
8+
return gulp.src('js-src/**/*.js')
9+
.pipe(concat('main.js'))
10+
.pipe(uglify())
11+
.pipe(gulp.dest('js/'));
12+
});
13+
14+
gulp.task('default', ['js']);
File renamed without changes.

js/showRoom.js renamed to js-src/showRoom.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(function(){
1+
$(document).ready(function(){
22
showRoom();
33

44
function showRoom(){
@@ -11,6 +11,6 @@ $(function(){
1111

1212
$(this).addClass("active");
1313
$(dayId).addClass("active");
14-
})
14+
});
1515
}
16-
})
16+
});
File renamed without changes.
File renamed without changes.

js/jquery-2.1.1.min.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

js/main.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "pythonbrasil11-site",
3+
"version": "1.0.0",
4+
"description": "Conferência Brasileira da Comunidade Python",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/pythonbrasil/pythonbrasil11-site.git"
12+
},
13+
"keywords": [
14+
"python",
15+
"conference",
16+
"brasil"
17+
],
18+
"author": "",
19+
"license": "ISC",
20+
"bugs": {
21+
"url": "https://github.com/pythonbrasil/pythonbrasil11-site/issues"
22+
},
23+
"homepage": "https://github.com/pythonbrasil/pythonbrasil11-site",
24+
"devDependencies": {
25+
"gulp": "^3.9.0",
26+
"gulp-concat": "^2.6.0",
27+
"gulp-uglify": "^1.4.1"
28+
}
29+
}

0 commit comments

Comments
 (0)