Skip to content

Commit

Permalink
Update: JShint and modules JS
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo Luiz Rodrigues Costa committed Feb 22, 2017
1 parent 9688a55 commit 14b6094
Show file tree
Hide file tree
Showing 15 changed files with 10,341 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .jshintignore
@@ -0,0 +1,3 @@
src/js/libs/
src/js/plugins/

5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -35,7 +35,10 @@ Then you need to install the dependencies to run this boilerplate:
│   │   │   ├── fonts
│   │   ├── img
│   │   ├── js
│   │   │   └── main.js
│   │   │   └── libs/*.js
│   │   │   ├── plugins/*.js
│   │   │   ├── modules/*.js
│   │   │   ├── main.js
│   ├── index.html
├── gulpfile.js
├── package.json
Expand Down
2 changes: 1 addition & 1 deletion deploy/assets/css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion deploy/assets/js/main.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions deploy/index.html
Expand Up @@ -28,15 +28,15 @@
<body>
<header class="header-page">
<div class="container">
<div class="brand"><img src="assets/img/logo-iceberg-boilerplate.svg" alt="Iceberg Simple Boilerplate" width="300px"/>
<h1 class="brand-description">The Iceberg Simple Boilerplate is a simple boilerplate using Gulp, Jade, Stylus and Browsersync.</h1>
<div class="header-page__brand brand"><img class="brand__media" src="assets/img/logo-iceberg-boilerplate.svg" alt="Iceberg Simple Boilerplate" width="300px"/>
<h1 class="brand__description">The Iceberg Simple Boilerplate is a simple boilerplate using Gulp, Jade, Stylus and Browsersync.</h1>
</div>
</div>
</header>
<div class="container">
<main class="main-page"><a class="btn" href="https://github.com/diogorodrigues/iceberg-boilerplate">Fork me on github</a></main>
</div>
<footer class="footer-page">By <a href="https://github.com/diogorodrigues">Diogo Rodrigues</a></footer>
<footer class="footer-page">By <a class="footer-page__link" href="https://github.com/diogorodrigues">Diogo Rodrigues</a></footer>
<script async="async" src="assets/js/main.js"></script>
</body>
</html:5>
16 changes: 13 additions & 3 deletions gulpfile.js
Expand Up @@ -11,6 +11,7 @@ var gulp = require('gulp'),
prefixer = require('autoprefixer-stylus'),
cssnano = require('gulp-cssnano'),
uglify = require('gulp-uglify'),
jshint = require("gulp-jshint"),
concat = require('gulp-concat'),
imagemin = require('gulp-imagemin'),
browserSync = require('browser-sync'),
Expand All @@ -27,13 +28,19 @@ var gulp = require('gulp'),
bower: "./bower_components/"
},
srcPaths = {
jsVendors: paths.dev + 'js/vendor/*.js',
js: paths.dev + 'js/*.js',
jsLibs: paths.dev + 'js/libs/*.js',
jsPlugins: paths.dev + 'js/plugins/*.js',
jsModules: paths.dev + 'js/modules/*.js',

css: paths.dev + 'styl/**/*.styl',
mainStyl: paths.dev + 'styl/main.styl',

pug: paths.dev + 'views/**/*.pug',
pugPages: paths.dev + 'views/pages/**/*.pug',

img: paths.dev + 'img/**/*.{jpg,png,gif,svg}',

fonts: paths.dev + 'fonts/*',
},
buildPaths = {
Expand Down Expand Up @@ -93,10 +100,13 @@ gulp.task('fonts', function() {

// Javascript Task
gulp.task('js', function() {
return gulp.src([srcPaths.jsVendors, srcPaths.js])
return gulp.src([ srcPaths.jsLibs, srcPaths.jsPlugins, srcPaths.jsModules, srcPaths.js ])
.pipe(plumber())
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(concat('main.js'))
.pipe(uglify()) //--> minify js
.pipe(browserSync.reload({stream:true}))
.pipe(gulp.dest(buildPaths.js))
.pipe(reload({stream: true}));
});
Expand All @@ -118,7 +128,7 @@ gulp.task('watch', function () {
gulp.start('css', done);
}));

watch(srcPaths.js, batch(function(event, done){
watch([srcPaths.jsModules, srcPaths.js], batch(function(event, done){
gulp.start('js', done);
}));

Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -26,13 +26,15 @@
"gulp-concat": "^2.6.0",
"gulp-cssnano": "^2.1.1",
"gulp-imagemin": "^2.4.0",
"gulp-jshint": "^2.0.4",
"gulp-plumber": "^1.1.0",
"gulp-pug": "^3.0.4",
"gulp-rucksack": "^0.1.3",
"gulp-stylus": "^2.3.1",
"gulp-uglify": "^1.5.3",
"gulp-watch": "^4.3.5",
"jeet": "^6.1.1",
"jshint": "^2.9.4",
"kouto-swiss": "^0.11.14",
"run-sequence": "^1.1.5",
"rupture": "^0.6.1"
Expand Down

0 comments on commit 14b6094

Please sign in to comment.