Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/0.5.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yago committed Jun 15, 2016
2 parents e5adc32 + 3148ce0 commit a3cd1b8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
3 changes: 1 addition & 2 deletions app/templates/_gulp_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"css": [
""
],
"js": [
"node_modules/jquery/dist/jquery.js"<% if (bootstrapSass) { %>,
"js": [<% if (bootstrapSass) { %>,
"node_modules/bootstrap-sass/assets/javascripts/bootstrap/affix.js",
"node_modules/bootstrap-sass/assets/javascripts/bootstrap/alert.js",
"node_modules/bootstrap-sass/assets/javascripts/bootstrap/button.js",
Expand Down
6 changes: 4 additions & 2 deletions app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "<%= slug(name).toLowerCase() %>",
"version": "0.0.0",
"main": "index.html",
"browserify-shim": {},
"browserify-shim": {
"jquery": "global:jQuery"
},
"dependencies": {<% if (bootstrap4) { %>
"bootstrap": "[email protected]:twbs/bootstrap.git#v4-dev",<% } else if (bootstrapSass) { %>
"bootstrap-sass": "~3.3.5",<% } %>
"html5shiv": "^3.7.3",
"jquery": "^2.1.4",
"jquery": "^2.2.4",
"respond.js": "^1.4.2"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion app/templates/assets/templates/base.html.swig
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
</div>
{% endif %}

<script src="https://code.jquery.com/jquery-2.2.4.min.js" crossorigin="anonymous"></script>
<script src="/build/js/vendors.min.js"></script>
<script src="/build/js/main.js"></script>
<script src="/build/js/bundle.js"></script>

{% if styleguide %}
<script>
Expand Down
30 changes: 14 additions & 16 deletions app/templates/tasks/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ var gulp = require('gulp'),
module.exports = function() {

function errorAlert(error){
var args = Array.prototype.slice.call(arguments);

if (!argv.production) {
$.notify.onError({title: 'JS Error', message: 'Check your terminal', sound: 'Sosumi'})(error);
$.util.log(error.messageFormatted);
}
this.emit('end');
};

function handleErrors() {
var args = Array.prototype.slice.call(arguments);
$.notify.onError({
title: 'Compile Error',
message: '<%= error.message %>'
}).apply(this, args);
if (args) {
$.util.log(args);
} else {
$.util.log(error.messageFormatted);
}
}
this.emit('end');
}

Expand All @@ -48,14 +46,14 @@ module.exports = function() {
sourceMaps: true
}))
.bundle()
.on('error', handleErrors)
.on('error', errorAlert)
.pipe(source('bundle.js'))
.pipe(buffer())
.pipe($.sourcemaps.init({loadMaps: true}))
.pipe($.if(argv.production, $.uglify()))
.on('error', handleErrors)
.on('error', errorAlert)
.pipe(argv.production ? $.util.noop() : $.sourcemaps.write('./'))
.pipe(gulp.dest(config.build));
.pipe(gulp.dest(config.build + '/js'));
} else {
return browserify(
{
Expand All @@ -68,15 +66,15 @@ module.exports = function() {
}))
.transform(browserifyshim)
.bundle()
.on('error', handleErrors)
.on('error', errorAlert)
.pipe(source('bundle.js'))
.pipe(buffer())
.pipe($.sourcemaps.init({loadMaps: true}))
.pipe($.if(argv.production, $.uglify()))
.on('error', handleErrors)
.on('error', errorAlert)
.pipe(argv.production ? $.util.noop() : $.sourcemaps.write('./'))
.pipe($.size({title: 'BUNDLE SIZE', showFiles: true}))
.pipe(gulp.dest(config.build));
.pipe(gulp.dest(config.build + '/js'));
}
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-toolbox",
"version": "0.5.3",
"version": "0.5.4",
"description": "Yeoman generator",
"license": "MIT",
"main": "app/index.js",
Expand Down

0 comments on commit a3cd1b8

Please sign in to comment.