/*
 * Copyright 2013 Palantir Technologies, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

module.exports = function(grunt) {
  'use strict';

  // project configuration
  grunt.initConfig({
    bridge: 'com.palantir.typescript/bridge',
    pkg: grunt.file.readJSON('package.json'),


    concat: {
      dist: {
        src: ['<%= bridge %>/lib/typescriptServices.js', '<%= bridge %>/build/bridge.js'],
        dest: 'com.palantir.typescript/bin/bridge.js'
      }
    },

    ts: {
      options: {
        compiler: "<%= bridge %>/bin/tsc",
        fast: "never"
      },
      compile: {
        src: ['<%= bridge %>/src/main.ts', '<%= bridge %>/typings/*.d.ts'],
        out: '<%= bridge %>/build/bridge.js',
        options: {
          declaration: true
        }
      }
    },

    watch: {
      scripts: {
        files: ['<%= bridge %>/src/*.ts', '<%= bridge %>/typings/*.d.ts'],
        tasks: ['default'],
      },
    }
  });

  // load NPM tasks
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-ts');

  // other tasks
  grunt.registerTask('default', ['ts:compile', 'concat']);
};

@@ -642,17 +642,17 @@
 nt) %7B%0A  
-'
+%22
 use stri
@@ -653,17 +653,17 @@
 e strict
-'
+%22
 ;%0A%0A  // 
@@ -717,17 +717,17 @@
 bridge: 
-'
+%22
 com.pala
@@ -748,17 +748,17 @@
 t/bridge
-'
+%22
 ,%0A    pk
@@ -780,17 +780,17 @@
 eadJSON(
-'
+%22
 package.
@@ -793,17 +793,17 @@
 age.json
-'
+%22
 ),%0A%0A%0A   
@@ -833,33 +833,33 @@
 %7B%0A        src: %5B
-'
+%22
 %3C%25= bridge %25%3E/li
@@ -881,20 +881,20 @@
 vices.js
-', '
+%22, %22
 %3C%25= brid
@@ -914,17 +914,17 @@
 ridge.js
-'
+%22
 %5D,%0A     
@@ -932,17 +932,17 @@
   dest: 
-'
+%22
 com.pala
@@ -970,17 +970,17 @@
 ridge.js
-'
+%22
 %0A      %7D
@@ -1120,17 +1120,17 @@
   src: %5B
-'
+%22
 %3C%25= brid
@@ -1146,20 +1146,20 @@
 /main.ts
-', '
+%22, %22
 %3C%25= brid
@@ -1170,33 +1170,33 @@
 %3E/typings/*.d.ts
-'
+%22
 %5D,%0A        out: 
@@ -1195,17 +1195,17 @@
    out: 
-'
+%22
 %3C%25= brid
@@ -1225,17 +1225,17 @@
 ridge.js
-'
+%22
 ,%0A      
@@ -1347,17 +1347,17 @@
 files: %5B
-'
+%22
 %3C%25= brid
@@ -1370,20 +1370,20 @@
 src/*.ts
-', '
+%22, %22
 %3C%25= brid
@@ -1402,17 +1402,17 @@
 s/*.d.ts
-'
+%22
 %5D,%0A     
@@ -1422,25 +1422,25 @@
 tasks: %5B
-'
+%22
 default
-'
+%22
 %5D,%0A     
@@ -1489,33 +1489,33 @@
 nt.loadNpmTasks(
-'
+%22
 grunt-contrib-co
@@ -1518,17 +1518,17 @@
 b-concat
-'
+%22
 );%0A  gru
@@ -1539,25 +1539,25 @@
 oadNpmTasks(
-'
+%22
 grunt-contri
@@ -1563,17 +1563,17 @@
 ib-watch
-'
+%22
 );%0A  gru
@@ -1592,17 +1592,17 @@
 sks(
-'
+%22
 grunt-ts
 ');%0A
@@ -1597,17 +1597,17 @@
 grunt-ts
-'
+%22
 );%0A%0A  //
@@ -1644,21 +1644,21 @@
 ask(
-'
+%22
 default
-', %5B'
+%22, %5B%22
 ts:c
@@ -1667,19 +1667,19 @@
 pile
-', '
+%22, %22
 concat
-'
+%22
 %5D);%0A

Normalize quotes