tasks/jspm/jspm.js
function _shellBundle({
  src = 'app/main.js',
  dest = 'dist',
  baseName = 'build',
  ignoreVendors = false,
  onlyVendors = false
} = {}, jspmConfig, useSourcemaps = false) {
  // Get dependencies from jspm configurations
  const vendors = Object.keys(jspmConfig.dependencies)

  // Commands to prepare the shell to bundle with jspm
  let arithmetic = ''
  let opt = '--minify --skip-source-maps'
  let source = src

  // Only minify and keep sourcemaps
  if (useSourcemaps) {
    opt = '--minify'
  }

  // Make string to ignore vendors in bundle app.
  if (ignoreVendors) {
    arithmetic = _vendorsList(vendors, true)
  }

  // Make string to include only vendors in bundle dep and change source
  // command.
  if (onlyVendors) {
    source = vendors[0]
    arithmetic = _vendorsList(vendors, false)
  }

  // Return shell command to bundle
  return [
    `jspm bundle ${source} ${arithmetic} ${dest}/${baseName}.js ${opt}`
  ]
}
function _shellBundle({
  src = 'app/main.js',
  dest = 'dist',
  baseName = 'build',
  ignoreVendors = false,
  onlyVendors = false
} = {}, jspmConfig, useSourcemaps = false) {
  // Get dependencies from jspm configurations
  const vendors = Object.keys(jspmConfig.dependencies)

  // Commands to prepare the shell to bundle with jspm
  let arithmetic = ''
  let opt = '--minify --skip-source-maps'
  let source = src

  // Only minify and keep sourcemaps
  if (useSourcemaps) {
    opt = '--minify'
  }

  // Make string to ignore vendors in bundle app.
  if (ignoreVendors) {
    arithmetic = _vendorsList(vendors, true)
  }

  // Make string to include only vendors in bundle dep and change source
  // command.
  if (onlyVendors) {
    source = vendors[0]
    arithmetic = _vendorsList(vendors, false)
  }

  // Return shell command to bundle
  return [
    `jspm bundle ${source} ${arithmetic} ${dest}/${baseName}.js ${opt}`
  ]
}
function _shellBundle ( { src = 'app/main.js' , dest = 'dist' , baseName = 'build' , ignoreVendors = false , onlyVendors = false } = { } , jspmConfig , useSourcemaps = false ) { // Get dependencies from jspm configurations const vendors = Object . keys ( jspmConfig . dependencies ) // Commands to prepare the shell to bundle with jspm let arithmetic = '' let opt = '--minify --skip-source-maps' let source = src // Only minify and keep sourcemaps if ( useSourcemaps ) { opt = '--minify' } // Make string to ignore vendors in bundle app. if ( ignoreVendors ) { arithmetic = _vendorsList ( vendors , true ) } // Make string to include only vendors in bundle dep and change source // command. if ( onlyVendors ) { source = vendors [ 0 ] arithmetic = _vendorsList ( vendors , false ) } // Return shell command to bundle return [ ` ${ source } ${ arithmetic } ${ dest } ${ baseName } ${ opt } ` ] }
HELPER FUNCTIONS 
Prepare shell comand for jspm bundle
@param {Object} - An options object with this properties:
{
Source path
src: 'app/main.js',

Destination path
dest: 'dest/path',

Name of the output file without extension
baseName: 'build',

Make arithmetic to only bundle app files (no include jspm dependencies)
ignoreVendors: false,

Make source and arithmetic to bundle only dependencies
onlyVendors: false
}
@param {Object} jspmConfig - jspm object extracted from package.json of main
project
@param {boolean} useSourcemaps - indicate if use sourcemaps
HELPER FUNCTIONS Prepare shell comand for jspm bundle @param { Object } - An options object with this properties : { Source path src : app / main . js