File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 86
86
<ItemGroup >
87
87
<Content Include =" Global.asax" />
88
88
<Content Include =" Index.html" />
89
+ <Content Include =" Scripts\Watts.tt" >
90
+ <Generator >TextTemplatingFileGenerator</Generator >
91
+ </Content >
89
92
<Content Include =" Web.config" />
90
93
</ItemGroup >
91
94
<ItemGroup >
99
102
</ItemGroup >
100
103
<ItemGroup >
101
104
<Content Include =" packages.config" />
105
+ <Content Include =" Watts.config.json" />
102
106
<None Include =" Web.Debug.config" >
103
107
<DependentUpon >Web.config</DependentUpon >
104
108
</None >
Original file line number Diff line number Diff line change @@ -157,7 +157,24 @@ private Config.Config GetConfig(string configFilePath)
157
157
{
158
158
var configFileContent = File . ReadAllText ( configFilePath ) ;
159
159
160
- return JsonConvert . DeserializeObject < Config . Config > ( configFileContent ) ;
160
+ var config = JsonConvert . DeserializeObject < Config . Config > ( configFileContent ) ;
161
+
162
+ var baseDir = Path . GetDirectoryName ( configFilePath ) ?? "" ;
163
+ config . WebApiModuleFileName = Path . Combine ( baseDir , config . WebApiModuleFileName ) ;
164
+ config . EndpointsOutputDirectory = Path . Combine ( baseDir , config . EndpointsOutputDirectory ) ;
165
+ config . ServiceOutputDirectory = Path . Combine ( baseDir , config . ServiceOutputDirectory ) ;
166
+ config . EnumsOutputDirectory = Path . Combine ( baseDir , config . EnumsOutputDirectory ) ;
167
+ config . InterfacesOutputDirectory = Path . Combine ( baseDir , config . InterfacesOutputDirectory ) ;
168
+ config . ViewsOutputDirectory = Path . Combine ( baseDir , config . ViewsOutputDirectory ) ;
169
+ config . ResourcesOutputDirectory = Path . Combine ( baseDir , config . ResourcesOutputDirectory ) ;
170
+
171
+ foreach ( var c in config . ViewConfigs )
172
+ c . SourceDirectory = Path . Combine ( baseDir , c . SourceDirectory ) ;
173
+
174
+ foreach ( var c in config . ResourceConfigs )
175
+ c . SourcePath = Path . Combine ( baseDir , c . SourcePath ) ;
176
+
177
+ return config ;
161
178
}
162
179
163
180
private void CreateFileForBlock ( TypeScriptBlock typeScriptBlock , string outputDirectory , string fileName )
You can’t perform that action at this time.
0 commit comments