@@ -3,13 +3,12 @@ import chrome.permissions.Permission
3
3
import chrome .permissions .Permission .{API , Host }
4
4
import com .alexitc .{Chrome , ChromeSbtPlugin }
5
5
6
- lazy val examples = project.in(file( " . " )).aggregate(exampleApp, extension)
6
+ lazy val scalajsChromeV = " SCALAJS_CHROME_VERSION "
7
7
8
- lazy val scalaJsChrome = ProjectRef (file(" ../. " ), " bindings " )
8
+ lazy val examples = project.in (file(" ." )).aggregate(exampleApp, extension )
9
9
10
10
lazy val exampleApp = project
11
11
.in(file(" app" ))
12
- .dependsOn(scalaJsChrome)
13
12
.enablePlugins(ChromeSbtPlugin )
14
13
.settings(
15
14
name := " Example App" ,
@@ -23,12 +22,12 @@ lazy val exampleApp = project
23
22
" -Xfatal-warnings" ,
24
23
" -feature"
25
24
),
25
+ libraryDependencies += " com.alexitc" %%% " scala-js-chrome" % scalajsChromeV,
26
26
scalaJSUseMainModuleInitializer := true ,
27
27
Test / scalaJSUseMainModuleInitializer := false ,
28
28
scalaJSLinkerConfig := scalaJSLinkerConfig.value.withRelativizeSourceMapBase(
29
29
Some ((Compile / fastOptJS / artifactPath).value.toURI)
30
30
),
31
- packageJSDependencies / skip := false ,
32
31
// you can customize and have a static output name for lib and dependencies
33
32
// instead of having the default files names like app-fastopt.js, ...
34
33
(Compile / fastOptJS / artifactPath) := {
@@ -37,19 +36,13 @@ lazy val exampleApp = project
37
36
(Compile / fullOptJS / artifactPath) := {
38
37
(fullOptJS / crossTarget).value / " main.js"
39
38
},
40
- (Compile / packageJSDependencies / artifactPath) := {
41
- (packageJSDependencies / crossTarget).value / " dependencies.js"
42
- },
43
- (Compile / packageMinifiedJSDependencies / artifactPath) := {
44
- (packageMinifiedJSDependencies / crossTarget).value / " dependencies.js"
45
- },
46
39
chromeManifest := new AppManifest {
47
40
val name = Keys .name.value
48
41
val version = Keys .version.value
49
42
50
43
val app = App (
51
44
background = Background (
52
- scripts = List (" main.js" , " dependencies .js" )
45
+ scripts = List (" main.js" , " main-bundle .js" )
53
46
)
54
47
)
55
48
override val defaultLocale = Some (" en" )
@@ -72,7 +65,6 @@ lazy val exampleApp = project
72
65
73
66
lazy val extension = project
74
67
.in(file(" extension" ))
75
- .dependsOn(scalaJsChrome)
76
68
.enablePlugins(ChromeSbtPlugin )
77
69
.settings(
78
70
name := " Example Extension" ,
@@ -86,12 +78,12 @@ lazy val extension = project
86
78
" -Xfatal-warnings" ,
87
79
" -feature"
88
80
),
81
+ libraryDependencies += " com.alexitc" %%% " scala-js-chrome" % scalajsChromeV,
89
82
scalaJSUseMainModuleInitializer := true ,
90
83
Test / scalaJSUseMainModuleInitializer := false ,
91
84
scalaJSLinkerConfig := scalaJSLinkerConfig.value.withRelativizeSourceMapBase(
92
85
Some ((Compile / fastOptJS / artifactPath).value.toURI)
93
86
),
94
- packageJSDependencies / skip := false ,
95
87
// you can customize and have a static output name for lib and dependencies
96
88
// instead of having the default files names like extension-fastopt.js, ...
97
89
(Compile / fastOptJS / artifactPath) := {
@@ -100,16 +92,10 @@ lazy val extension = project
100
92
(Compile / fullOptJS / artifactPath) := {
101
93
(fullOptJS / crossTarget).value / " main.js"
102
94
},
103
- (Compile / packageJSDependencies / artifactPath) := {
104
- (packageJSDependencies / crossTarget).value / " dependencies.js"
105
- },
106
- (Compile / packageMinifiedJSDependencies / artifactPath) := {
107
- (packageMinifiedJSDependencies / crossTarget).value / " dependencies.js"
108
- },
109
95
chromeManifest := new ExtensionManifest {
110
96
111
97
val background = Background (
112
- scripts = List (" main.js" , " dependencies .js" )
98
+ scripts = List (" main.js" , " main-bundle .js" )
113
99
)
114
100
val name = Keys .name.value
115
101
val version = Keys .version.value
0 commit comments