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