File tree Expand file tree Collapse file tree 5 files changed +35
-14
lines changed Expand file tree Collapse file tree 5 files changed +35
-14
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
2
kotlin(" js" )
3
+ id(" kotlin-dce-js" )
3
4
}
4
5
5
6
group = " com.ilgonmic"
6
7
version = " 1.0-SNAPSHOT"
7
8
8
9
repositories {
9
- mavenLocal()
10
10
mavenCentral()
11
11
}
12
12
@@ -17,18 +17,19 @@ dependencies {
17
17
18
18
kotlin {
19
19
target {
20
- browser {
20
+ browser {}
21
+ }
22
+ }
21
23
22
- // This strange case only for test :)
23
- dceKeep.add(" kotlinjs-multi-module-app.notDelete" )
24
+ tasks {
25
+ runDceKotlin {
26
+ dceOptions {
27
+ outputDirectory = " ${rootProject.buildDir} /js/packages/${rootProject.name} -${project.name} /kotlin-dce"
28
+ }
24
29
25
- webpackTask {
26
- dceEnabled = false
27
- }
30
+ getByName(" browserWebpack" ).dependsOn(this )
28
31
29
- runTask {
30
- dceEnabled = true
31
- }
32
- }
32
+ // It should be improved, DCE and optimize.js is not necessary to use with run task
33
+ getByName(" browserRun" ).dependsOn(this )
33
34
}
34
35
}
Original file line number Diff line number Diff line change
1
+ ( function ( ) {
2
+ var path = require ( 'path' ) ;
3
+
4
+ config . entry = [ path . resolve ( __dirname , "kotlin-dce/kotlinjs-multi-module-app.js" ) ] ;
5
+
6
+ config . resolve . modules . unshift ( path . resolve ( __dirname , "kotlin-dce" ) ) ;
7
+
8
+ config . mode = "production" ;
9
+
10
+ config . devtool = "source-map"
11
+ } ) ( ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
plugins {
2
- kotlin(" js" ) version " 1.3-SNAPSHOT " apply false
2
+ kotlin(" js" ) version " 1.3.60-eap-23 " apply false
3
3
}
4
4
5
5
group = " com.ilgonmic"
6
6
version = " 1.0-SNAPSHOT"
7
7
8
+ allprojects {
9
+ repositories {
10
+ maven(url = " https://dl.bintray.com/kotlin/kotlin-eap" )
11
+ mavenCentral()
12
+ }
13
+ }
14
+
8
15
tasks {
9
16
wrapper {
10
17
distributionType = Wrapper .DistributionType .ALL
Original file line number Diff line number Diff line change @@ -4,4 +4,8 @@ fun answer(): Int {
4
4
5
5
fun sheldon (): Int {
6
6
return 73
7
+ }
8
+
9
+ fun sheldon2 (): Int {
10
+ return 37
7
11
}
You can’t perform that action at this time.
0 commit comments