smart.js
function (smart_filename, package_filename) {
      var smart = read(smart_filename)
      var data = {
        global: hydrate(smart.global, smart.global),
        package: read(package_filename)
      }

      var dist = data.global.files.dist || 'dist'
      var res = resources(hydrate(smart.template, data),
        hydrate(smart.data, data), data.global.files.concatenator, dist)

      return {
        svg: res.svg,
        png: res.png,
        icon: res.icon,
        sprite: res.sprite,
        dist: dist,
        html: hydrate(smart.html, data)
      }
    }
function (smart_filename, package_filename) {
      var smart = read(smart_filename)
      var data = {
        global: hydrate(smart.global, smart.global),
        package: read(package_filename)
      }

      var dist = data.global.files.dist || 'dist'
      var res = resources(hydrate(smart.template, data),
        hydrate(smart.data, data), data.global.files.concatenator, dist)

      return {
        svg: res.svg,
        png: res.png,
        icon: res.icon,
        sprite: res.sprite,
        dist: dist,
        html: hydrate(smart.html, data)
      }
    }
function ( smart_filename , package_filename ) { var smart = read ( smart_filename ) var data = { global : hydrate ( smart . global , smart . global ) , package : read ( package_filename ) } var dist = data . global . files . dist || 'dist' var res = resources ( hydrate ( smart . template , data ) , hydrate ( smart . data , data ) , data . global . files . concatenator , dist ) return { svg : res . svg , png : res . png , icon : res . icon , sprite : res . sprite , dist : dist , html : hydrate ( smart . html , data ) } }
Load and process the svg-smart json file
@param {smart_filename} string, the svg-smart json file
@param {package_filename} string, node.js package filename (reuse of information)
@return object, a list of resources to be generated (svg, png, ico, sprite)
Load and process the svg - smart json file