       else
         chunk
 
-    grunt.file.write 'tmp/bradypodion.less', fileContent
+    filename = if general
+      ''
+    else
+      '.' + platforms.sort().join '.'
+
+    grunt.file.write grunt.template.process(
+      "<%=bp.tmp%>/styles/bradypodion#{filename}.less"
+    ), fileContent
 
     # create less task configuration on runtime depending on platforms
-    unless lessTask
-      filename = platforms.sort().join '.'
-      config = grunt.config.get 'less'
-      config.custom =
-        src: ["<%= clean.tmp %>/bradypodion.less"]
-        dest: "#{DIST_DIR}/bradypodion.#{filename}.css"
-      grunt.config.set 'less', config
-      lessTask = "less:custom"
-
-    # compile less and clean up
-    grunt.task.run [
-      lessTask
-      'clean:tmp']
+    config =
+      custom:
+        src: ["<%=bp.tmp%>/styles/bradypodion#{filename}.less"]
+        dest: "<%=bp.dist%>/bradypodion#{filename}.css"
+
+    grunt.config.set 'less', config
+
+    # compile less
+    grunt.task.run ['less:custom']
 
   grunt.registerTask 'release', ->
     done = @async()

          level: 'error'
        no_stand_alone_at:
          level: 'error'
      directives:
        files: src: ["#{MODULES_DIR}/*/*/*.coffee"]
        max_line_length:
          value: 79
          level: 'error'
      tests:
        files: src: "<%= coffee.tests.src %>"
      gruntfile:
        files: src: [GRUNTFILE]

    groc:
      options:
        out: 'docs/'
        index: "#{MODULES_DIR}/index.md"
        strip: "#{MODULES_DIR}"
      modules: [
        "#{MODULES_DIR}/index.md"
        "#{MODULES_DIR}/**/*.{coffee,less,md}"
        "!#{MODULES_DIR}/**/test.coffee"
        "!#{MODULES_DIR}/_less/*.less"
        "!#{MODULES_DIR}/bradypodion.*"]

    karma:
      options:

      matches = path.match(/(^(.*\/|)([a-zA-Z0-9-_.]+))\.less$/)
      platform = matches[3]
      if platform in platforms or platform is 'general'
        chunk = "@import '../../#{matches[1]}';"
        chunks[platform] += chunk

    # import config and modules
