@@ -28,21 +28,21 @@ document.getElementById("blockModelForm").onsubmit = form => {
2828
2929 const jsonContent = JSON . stringify ( jsonProduct , null , 4 ) ;
3030
31- if ( ! fs . existsSync ( `${ filepath } \\model ` ) ) {
32- fs . mkdir ( `${ filepath } \\model ` , ( err ) => {
31+ if ( ! fs . existsSync ( `${ filepath } \\models ` ) ) {
32+ fs . mkdir ( `${ filepath } \\models ` , ( err ) => {
3333 if ( err ) throw err ;
3434 console . log ( 'Made the model folder.' ) ;
3535 } ) ;
3636 }
3737
38- if ( ! fs . existsSync ( `${ filepath } \\model \\block` ) ) {
39- fs . mkdir ( `${ filepath } \\model \\block` , ( err ) => {
38+ if ( ! fs . existsSync ( `${ filepath } \\models \\block` ) ) {
39+ fs . mkdir ( `${ filepath } \\models \\block` , ( err ) => {
4040 if ( err ) throw err ;
4141 console . log ( 'Made the model/block/ folder.' ) ;
4242 } ) ;
4343 }
4444
45- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } .json` , jsonContent , 'utf8' , ( err ) => {
45+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } .json` , jsonContent , 'utf8' , ( err ) => {
4646 if ( err ) throw err ;
4747 console . log ( 'Made block file' ) ;
4848 } ) ;
@@ -78,27 +78,27 @@ document.getElementById("blockModelForm").onsubmit = form => {
7878 const jsonContent1 = JSON . stringify ( jsonProduct1 , null , 4 ) ;
7979 const jsonContent2 = JSON . stringify ( jsonProduct2 , null , 4 ) ;
8080
81- if ( ! fs . existsSync ( `${ filepath } \\model ` ) ) {
82- fs . mkdir ( `${ filepath } \\model ` , ( err ) => {
81+ if ( ! fs . existsSync ( `${ filepath } \\models ` ) ) {
82+ fs . mkdir ( `${ filepath } \\models ` , ( err ) => {
8383 if ( err ) throw err ;
8484 console . log ( 'Made the model folder.' ) ;
8585 } ) ;
8686 }
8787
88- if ( ! fs . existsSync ( `${ filepath } \\model \\block` ) ) {
89- fs . mkdir ( `${ filepath } \\model \\block` , ( err ) => {
88+ if ( ! fs . existsSync ( `${ filepath } \\models \\block` ) ) {
89+ fs . mkdir ( `${ filepath } \\models \\block` , ( err ) => {
9090 if ( err ) throw err ;
9191 console . log ( 'Made the model/block/ folder.' ) ;
9292 } ) ;
9393 }
9494
95- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _slab.json` , jsonContent1 , 'utf8' , ( err ) => {
95+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _slab.json` , jsonContent1 , 'utf8' , ( err ) => {
9696 if ( err ) throw err ;
9797 console . log ( 'Made slab file.' ) ;
9898
9999 } ) ;
100100
101- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _slab_top.json` , jsonContent2 , 'utf8' , ( err ) => {
101+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _slab_top.json` , jsonContent2 , 'utf8' , ( err ) => {
102102 if ( err ) throw err ;
103103 console . log ( 'Made slab_top file.' ) ;
104104 } ) ;
@@ -144,31 +144,31 @@ document.getElementById("blockModelForm").onsubmit = form => {
144144 const jsonContent2 = JSON . stringify ( jsonProduct2 , null , 4 ) ;
145145 const jsonContent3 = JSON . stringify ( jsonProduct3 , null , 4 ) ;
146146
147- if ( ! fs . existsSync ( `${ filepath } \\model ` ) ) {
148- fs . mkdir ( `${ filepath } \\model ` , ( err ) => {
147+ if ( ! fs . existsSync ( `${ filepath } \\models ` ) ) {
148+ fs . mkdir ( `${ filepath } \\models ` , ( err ) => {
149149 if ( err ) throw err ;
150150 console . log ( 'Made the model folder.' ) ;
151151 } ) ;
152152 }
153153
154- if ( ! fs . existsSync ( `${ filepath } \\model \\block` ) ) {
155- fs . mkdir ( `${ filepath } \\model \\block` , ( err ) => {
154+ if ( ! fs . existsSync ( `${ filepath } \\models \\block` ) ) {
155+ fs . mkdir ( `${ filepath } \\models \\block` , ( err ) => {
156156 if ( err ) throw err ;
157157 console . log ( 'Made the model/block/ folder.' ) ;
158158 } ) ;
159159 }
160160
161- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _stairs.json` , jsonContent1 , 'utf8' , ( err ) => {
161+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _stairs.json` , jsonContent1 , 'utf8' , ( err ) => {
162162 if ( err ) throw err ;
163163 console . log ( 'Made stairs file.' ) ;
164164 } ) ;
165165
166- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _stairs_inner.json` , jsonContent2 , 'utf8' , ( err ) => {
166+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _stairs_inner.json` , jsonContent2 , 'utf8' , ( err ) => {
167167 if ( err ) throw err ;
168168 console . log ( 'Made inner stairs file.' ) ;
169169 } ) ;
170170
171- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _stairs_outer.json` , jsonContent3 , 'utf8' , ( err ) => {
171+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _stairs_outer.json` , jsonContent3 , 'utf8' , ( err ) => {
172172 if ( err ) throw err ;
173173 console . log ( 'Made outer stairs file.' ) ;
174174 } ) ;
@@ -208,31 +208,31 @@ document.getElementById("blockModelForm").onsubmit = form => {
208208 const jsonContent2 = JSON . stringify ( jsonProduct2 , null , 4 ) ;
209209 const jsonContent3 = JSON . stringify ( jsonProduct3 , null , 4 ) ;
210210
211- if ( ! fs . existsSync ( `${ filepath } \\model ` ) ) {
212- fs . mkdir ( `${ filepath } \\model ` , ( err ) => {
211+ if ( ! fs . existsSync ( `${ filepath } \\models ` ) ) {
212+ fs . mkdir ( `${ filepath } \\models ` , ( err ) => {
213213 if ( err ) throw err ;
214214 console . log ( 'Made the model folder.' ) ;
215215 } ) ;
216216 }
217217
218- if ( ! fs . existsSync ( `${ filepath } \\model \\block` ) ) {
219- fs . mkdir ( `${ filepath } \\model \\block` , ( err ) => {
218+ if ( ! fs . existsSync ( `${ filepath } \\models \\block` ) ) {
219+ fs . mkdir ( `${ filepath } \\models \\block` , ( err ) => {
220220 if ( err ) throw err ;
221221 console . log ( 'Made the model/block/ folder.' ) ;
222222 } ) ;
223223 }
224224
225- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _wall_post.json` , jsonContent1 , 'utf8' , ( err ) => {
225+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _wall_post.json` , jsonContent1 , 'utf8' , ( err ) => {
226226 if ( err ) throw err ;
227227 console . log ( 'Made the wall post file.' ) ;
228228 } ) ;
229229
230- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _wall_side.json` , jsonContent2 , 'utf8' , ( err ) => {
230+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _wall_side.json` , jsonContent2 , 'utf8' , ( err ) => {
231231 if ( err ) throw err ;
232232 console . log ( 'Made the wall side file.' ) ;
233233 } ) ;
234234
235- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _wall_side_tall.json` , jsonContent3 , 'utf8' , ( err ) => {
235+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _wall_side_tall.json` , jsonContent3 , 'utf8' , ( err ) => {
236236 if ( err ) throw err ;
237237 console . log ( 'Made the wall side top file.' ) ;
238238 } ) ;
@@ -266,26 +266,26 @@ document.getElementById("blockModelForm").onsubmit = form => {
266266 const jsonContent1 = JSON . stringify ( jsonProduct1 , null , 4 ) ;
267267 const jsonContent2 = JSON . stringify ( jsonProduct2 , null , 4 ) ;
268268
269- if ( ! fs . existsSync ( `${ filepath } \\model ` ) ) {
270- fs . mkdir ( `${ filepath } \\model ` , ( err ) => {
269+ if ( ! fs . existsSync ( `${ filepath } \\models ` ) ) {
270+ fs . mkdir ( `${ filepath } \\models ` , ( err ) => {
271271 if ( err ) throw err ;
272272 console . log ( 'Made the model folder.' ) ;
273273 } ) ;
274274 }
275275
276- if ( ! fs . existsSync ( `${ filepath } \\model \\block` ) ) {
277- fs . mkdir ( `${ filepath } \\model \\block` , ( err ) => {
276+ if ( ! fs . existsSync ( `${ filepath } \\models \\block` ) ) {
277+ fs . mkdir ( `${ filepath } \\models \\block` , ( err ) => {
278278 if ( err ) throw err ;
279279 console . log ( 'Made the model/block/ folder.' ) ;
280280 } ) ;
281281 }
282282
283- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _pillar.json` , jsonContent1 , 'utf8' , ( err ) => {
283+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _pillar.json` , jsonContent1 , 'utf8' , ( err ) => {
284284 if ( err ) throw err ;
285285 console . log ( 'Made pillar file.' ) ;
286286 } ) ;
287287
288- fs . writeFile ( `${ filepath } \\model \\block\\${ blockName } _pillar_horizontal.json` , jsonContent2 , 'utf8' , ( err ) => {
288+ fs . writeFile ( `${ filepath } \\models \\block\\${ blockName } _pillar_horizontal.json` , jsonContent2 , 'utf8' , ( err ) => {
289289 if ( err ) throw err ;
290290 console . log ( 'Made pillar horizontal file.' ) ;
291291 } ) ;
0 commit comments