| @@ -1,74 +1,77 | |||
| 
             | 
        1 | 1 | plugins { | 
| 
             | 
        2 | 2 | id "org.implab.gradle-typescript" version "1.3.3" | 
| 
             | 
        3 | 3 | id "ivy-publish" | 
| 
             | 
        4 | 4 | } | 
| 
             | 
        5 | 5 | |
| 
             | 
        6 | 6 | typescript { | 
| 
             | 
        7 | 7 | compilerOptions { | 
| 
             | 
        8 | 8 | lib = ["es5", "dom", "scripthost", "es2015.promise", "es2015.symbol", "es2015.iterable"] | 
| 
             | 
        9 | 9 | //listFiles = true | 
| 
             | 
        10 | 10 | declaration = true | 
| 
             | 
        11 | 11 | strict = true | 
| 
             | 
        12 | 12 | types = [] | 
| 
             | 
        13 | 13 | module = "amd" | 
| 
             | 
        14 | 14 | it.target = "es5" | 
| 
             | 
        15 | 15 | experimentalDecorators = true | 
| 
             | 
        16 | 16 | jsx = "react" | 
| 
             | 
        17 | 17 | jsxFactory = "createElement" | 
| 
             | 
        18 | 18 | moduleResolution = "node" | 
| 
             | 
        19 | 19 | // dojo-typings are sick | 
| 
             | 
        20 | 20 | skipLibCheck = true | 
| 
             | 
        21 | 21 | // traceResolution = true | 
| 
             | 
        22 | 22 | // baseUrl = "./" | 
| 
             | 
        23 | 23 | // paths = [ "*": [ "$projectDir/src/typings/*" ] ] | 
| 
             | 
        24 | 24 | // baseUrl = "$projectDir/src/typings" | 
| 
             | 
        25 | 25 | // typeRoots = ["$projectDir/src/typings"] | 
| 
             | 
        26 | 26 | } | 
| 
             | 
        27 | 27 | |
| 
             | 
        28 | 28 | tscCmd = "$projectDir/node_modules/.bin/tsc" | 
| 
             | 
        29 | 29 | tsLintCmd = "$projectDir/node_modules/.bin/tslint" | 
| 
             | 
        30 | 30 | esLintCmd = "$projectDir/node_modules/.bin/eslint" | 
| 
             | 
        31 | 31 | } | 
| 
             | 
        32 | 32 | |
| 
             | 
        33 | 33 | configureTsMain { | 
| 
             | 
        34 | sourceFiles { | |
| 
             | 
        35 | from sources.main.typings | |
| 
             | 
        36 | } | |
| 
             | 
        34 | 37 | compilerOptions { | 
| 
             | 
        35 | //baseUrl = "$projectDir/src" | |
| 
             | 
        38 | // baseUrl = "$projectDir/src" | |
| 
             | 
        36 | 39 | /*paths = [ | 
| 
             | 
        37 | 40 | "dojo/*" : [ "typings/dojo/*" ], | 
| 
             | 
        38 | 41 | "dijit/*" : [ "typings/dijit/*" ] | 
| 
             | 
        39 | 42 | ]*/ | 
| 
             | 
        40 | 
            
                     types = ["requirejs", "dojo-typings" | 
    |
| 
             | 
        43 | types = ["requirejs", "dojo-typings"] | |
| 
             | 
        41 | 44 | } | 
| 
             | 
        42 | 45 | } | 
| 
             | 
        43 | 46 | |
| 
             | 
        44 | 47 | configureTsTest { | 
| 
             | 
        45 | 48 | compilerOptions { | 
| 
             | 
        46 | 49 | typeRoots = [] | 
| 
             | 
        47 | 50 | types = ["requirejs", sources.main.output.typingsDir.get().toString() ] | 
| 
             | 
        48 | 51 | } | 
| 
             | 
        49 | 52 | } | 
| 
             | 
        50 | 53 | |
| 
             | 
        51 | 54 | npmPackMeta { | 
| 
             | 
        52 | 55 | meta { | 
| 
             | 
        53 | 56 | name = "@$npmScope/$project.name" | 
| 
             | 
        54 | 57 | } | 
| 
             | 
        55 | 58 | } | 
| 
             | 
        56 | 59 | |
| 
             | 
        57 | 60 | task npmPackTypings(type: Copy) { | 
| 
             | 
        58 | 61 | dependsOn typings | 
| 
             | 
        59 | 62 | |
| 
             | 
        60 | 63 | npmPackContents.dependsOn it | 
| 
             | 
        61 | 64 | |
| 
             | 
        62 | 65 | from typescript.typingsDir | 
| 
             | 
        63 | 66 | into npm.packageDir | 
| 
             | 
        64 | 67 | } | 
| 
             | 
        65 | 68 | |
| 
             | 
        66 | 69 | task printVersion { | 
| 
             | 
        67 | 70 | doLast { | 
| 
             | 
        68 | 71 | println "packageName: ${npmPackMeta.metadata.get().name}"; | 
| 
             | 
        69 | 72 | println "version: $version"; | 
| 
             | 
        70 | 73 | println "target: $typescript.compilerOptions.target"; | 
| 
             | 
        71 | 74 | println "module: $typescript.compilerOptions.module"; | 
| 
             | 
        72 | 75 | println "symbols: $symbols"; | 
| 
             | 
        73 | 76 | } | 
| 
             | 
        74 | 77 | } No newline at end of file | 
        
        General Comments 0
    
    
  
  
                      You need to be logged in to leave comments.
                      Login now
                    
                