 
 regex_all     = "/**/*"
 
-theme_name        = "THEME"
-theme_url         = "../theme"
-wordpress_url     = "../../wordpress"
-wordpress_plugins = []
+config = require "../theme/config.coffee"
 
-
-require "../theme/config.coffee"
-
+theme_name        = config.theme_name        or "THEME"
+theme_url         = config.theme_url         or "../theme"
+wordpress_url     = config.wordpress_url     or "../../wordpress"
+wordpress_plugins = config.wordpress_plugins or []
 
 output_url = "#{wordpress_url}/wp-content/themes/#{theme_name}"
+
 paths =
   "fonts":
     "src": ["#{theme_url}/assets/fonts/#{regex_all}"]



process.stdout.write("Theme Name: #{theme_name}\n")
gulpif(production, process.stdout.write("Compiling for Production\n\n"))

gulp.task "fonts", ->
  gulp.src paths.fonts.src

    .pipe coffee(bare: true)
    .pipe gulp.dest(paths.js.base)

  js_files = ("#{paths.js.base}/#{js}" for js in require(paths.js.app))

  gulp.src js_files
    .pipe plumber()
    .pipe concat("index.js")
    .pipe gulpif(production, uglify())
