Skip to content

Commit

Permalink
made source maps optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmacklin committed Feb 23, 2016
1 parent 7b8bd40 commit 0ade61c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Head to the [Quick Start Guide](#quick-start) if you're ready to go. If you're n
* Autoprefixer for CSS Vendor Prefixes (option)
* Bourbon Sass Mixin Library (option)
* Motion UI Sass Library (option for Foundation 6)
* Source Maps (option)
* Font Awesome iconic font (option)
* Jade Template Engine (option)

Expand Down Expand Up @@ -134,6 +135,10 @@ The [Bourbon](http://bourbon.io/) library includes a number of useful Sass mixin

Created by Zurb, the same company responsible for Foundation, [Motion UI](http://zurb.com/playground/motion-ui) allows you to create flexible CSS transitions and animations. Several of Foundation's own components use it, so be sure to include it if you plan on using one of them.

#### Source Maps

Source Maps allow us to better debug production-ready minified code with ease by creating a file that maps the compressed code back to it's original source.

#### Font Awesome iconic font

If you're in need of icons, chances are [Font Awesome](https://fortawesome.github.io/Font-Awesome/) has you covered.
Expand Down
9 changes: 9 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ module.exports = yeoman.generators.Base.extend({
{
name: 'Bourbon Sass Mixin Library'
},
{
name: 'Source Maps',
checked: true
},
{
name: 'Font Awesome Icons'
},
Expand Down Expand Up @@ -99,6 +103,10 @@ module.exports = yeoman.generators.Base.extend({
{
name: 'Bourbon Sass Mixin Library'
},
{
name: 'Source Maps',
checked: true
},
{
name: 'Font Awesome Icons'
},
Expand All @@ -118,6 +126,7 @@ module.exports = yeoman.generators.Base.extend({
if ( (props.options).indexOf('Flexbox-powered grid') !== -1 ) this.props.flexbox = true;
if ( (props.options).indexOf('Motion UI Sass Library') !== -1 ) this.props.motionUI = true;
if ( (props.options).indexOf('Bourbon Sass Mixin Library') !== -1 ) this.props.bourbon = true;
if ( (props.options).indexOf('Source Maps') !== -1 ) this.props.sourcemaps = true;
if ( (props.options).indexOf('Jade Templating') !== -1 ) this.props.jade = true;
if ( (props.options).indexOf('Font Awesome Icons') !== -1 ) this.props.fontAwesome = true;
if ( props.scssCompiler === 'Compass' ) this.props.compass = true;
Expand Down
4 changes: 2 additions & 2 deletions app/templates/_gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function bundle() {
.on('error', onError)
.pipe(source('bundle.js'))
.pipe(buffer())
.pipe(!prod ? sourcemaps.init() : gutil.noop())
<% if (props.babel) { %>.pipe(prod ? babel({
<% if (props.sourcemaps) { %>.pipe(sourcemaps.init())
<% } %><% if (props.babel) { %>.pipe(prod ? babel({
presets: ['es2015']
}) : gutil.noop())
<% } %>.pipe(concat('bundle.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-foundation-browserify",
"version": "0.3.7",
"version": "0.3.8",
"description": "Foundation, Browserify, Gulp, Sass, Babel for ECMAScript 6, Autoprefixer, BrowserSync Live Reloading",
"license": "MIT",
"main": "app/index.js",
Expand Down

0 comments on commit 0ade61c

Please sign in to comment.