| 338 | }, |
| 339 | |
| 340 | async wiki() { |
| 341 | // publish wiki pages to website |
| 342 | if (!fs.existsSync('docs/wiki/Home.md')) { |
| 343 | await git(fn => { |
| 344 | fn.clone('git@github.com:codeceptjs/CodeceptJS.wiki.git', 'docs/wiki') |
| 345 | }) |
| 346 | } |
| 347 | await chdir('docs/wiki', () => git(cfg => cfg.pull('origin master'))) |
| 348 | |
| 349 | await writeToFile('docs/community-helpers.md', cfg => { |
| 350 | cfg.line('---') |
| 351 | cfg.line('permalink: /community-helpers') |
| 352 | cfg.line('title: Community Helpers') |
| 353 | cfg.line('editLink: false') |
| 354 | cfg.line('---') |
| 355 | cfg.line('') |
| 356 | cfg.line('# Community Helpers') |
| 357 | cfg.line('> Share your helpers at our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Community-Helpers)') |
| 358 | cfg.line('') |
| 359 | cfg.textFromFile('docs/wiki/Community-Helpers-&-Plugins.md') |
| 360 | }) |
| 361 | |
| 362 | writeToFile('docs/examples.md', cfg => { |
| 363 | cfg.line('---') |
| 364 | cfg.line('permalink: /examples') |
| 365 | cfg.line('layout: Section') |
| 366 | cfg.line('sidebar: false') |
| 367 | cfg.line('title: Examples') |
| 368 | cfg.line('editLink: false') |
| 369 | cfg.line('---') |
| 370 | cfg.line('') |
| 371 | cfg.line('# Examples') |
| 372 | cfg.line('> Add your own examples to our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Examples)') |
| 373 | cfg.textFromFile('docs/wiki/Examples.md') |
| 374 | }) |
| 375 | |
| 376 | writeToFile('docs/books.md', cfg => { |
| 377 | cfg.line('---') |
| 378 | cfg.line('permalink: /books') |
| 379 | cfg.line('layout: Section') |
| 380 | cfg.line('sidebar: false') |
| 381 | cfg.line('title: Books & Posts') |
| 382 | cfg.line('editLink: false') |
| 383 | cfg.line('---') |
| 384 | cfg.line('') |
| 385 | cfg.line('# Books & Posts') |
| 386 | cfg.line('> Add your own books or posts to our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Books-&-Posts)') |
| 387 | cfg.textFromFile('docs/wiki/Books-&-Posts.md') |
| 388 | }) |
| 389 | |
| 390 | writeToFile('docs/videos.md', cfg => { |
| 391 | cfg.line('---') |
| 392 | cfg.line('permalink: /videos') |
| 393 | cfg.line('layout: Section') |
| 394 | cfg.line('sidebar: false') |
| 395 | cfg.line('title: Videos') |
| 396 | cfg.line('editLink: false') |
| 397 | cfg.line('---') |