@@ -49,7 +49,6 @@ private function doInitialize(InputInterface $input, OutputInterface $output, st
49
49
$ this ->buildContext ->initializeRuntimeConfig (
50
50
$ sourceDir ,
51
51
$ this ->initializeHtmlOutputDir ($ this ->filesystem , $ outputDir ),
52
- $ this ->initializeJsonOutputDir ($ outputDir ),
53
52
$ this ->initializeParseSubPath ($ input , $ sourceDir ),
54
53
$ this ->isCacheDisabled ()
55
54
);
@@ -104,16 +103,6 @@ private function initializeParseSubPath(InputInterface $input, string $sourceDir
104
103
return $ parseSubPath ;
105
104
}
106
105
107
- private function initializeJsonOutputDir (string $ outputDir ): string
108
- {
109
- $ jsonOutputDir = $ this ->getRealAbsolutePath ($ outputDir .'/_json ' , $ this ->filesystem );
110
- if ($ this ->isCacheDisabled () && $ this ->filesystem ->exists ($ jsonOutputDir )) {
111
- $ this ->filesystem ->remove ($ jsonOutputDir );
112
- }
113
-
114
- return $ jsonOutputDir ;
115
- }
116
-
117
106
private function getRealAbsolutePath (string $ path , Filesystem $ filesystem ): string
118
107
{
119
108
return sprintf (
@@ -157,7 +146,7 @@ private function startBuild()
157
146
158
147
$ this ->builder ->build (
159
148
$ this ->buildContext ->getSourceDir (),
160
- $ this ->buildContext ->getHtmlOutputDir ()
149
+ $ this ->buildContext ->getOutputDir ()
161
150
);
162
151
}
163
152
@@ -174,8 +163,8 @@ function (string $rstFile) {
174
163
array_keys (iterator_to_array ($ finder ))
175
164
);
176
165
177
- $ this ->sanitizeOutputDir ($ rstFiles , $ this ->buildContext ->getHtmlOutputDir (), 'html ' );
178
- $ this ->sanitizeOutputDir ($ rstFiles , $ this ->buildContext ->getJsonOutputDir (), 'json ' );
166
+ $ this ->sanitizeOutputDir ($ rstFiles , $ this ->buildContext ->getOutputDir (), 'html ' );
167
+ $ this ->sanitizeOutputDir ($ rstFiles , $ this ->buildContext ->getOutputDir (), 'fjson ' );
179
168
}
180
169
181
170
private function sanitizeOutputDir (array $ existingRstFiles , string $ outputDir , string $ format )
0 commit comments