sjdoc-maker

๐Ÿ“„

Build Status All Download Release License

Index

1. Documents for your project

1-1. With markdown

  1. mdํŒŒ์ผ ์ƒ์„ฑ
    • {ROOT_OF_YOUR_PROJECT}/src/sjdoc/index.md: ๋ฌธ์„œ๋Š” Markdown์œผ๋กœ ์ž‘์„ฑํ•˜๋ฉฐ ์ถ”๊ฐ€์ ์œผ๋กœ ๋ฉ”๋‰ด/์†Œ์ŠคํŽธ์ง‘/์‹คํ–‰๊ธฐ ๋“ฑ ํ™•์žฅ๋œ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • {ROOT_OF_YOUR_PROJECT}/src/sjdoc/*.md: ์—ฌ๋Ÿฌ ๋ฌธ์„œ๋ฅผ ๋งŒ๋“œ์„ธ์š”.
  2. ๊ตฌ์กฐ
    • File 1๊ฐœ๋‹น 1๊ฐœ์˜ Page๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.
    • Page์˜ ์‹œ์ž‘์€ #์œผ๋กœ ์ œ๋ชฉ์„ ๋ถ™์—ฌ์ค๋‹ˆ๋‹ค. ์ œ๋ชฉ์€ ์™ผ์ชฝ๋ฉ”๋‰ด๋ช…๊ณผ Index Page์˜ ๋ชฉ๋ก๊ธฐ๋Šฅ์„ ์‚ฌ์šฉ์‹œ ๋…ธ์ถœ๋ฉ๋‹ˆ๋‹ค.

1-2. Check Sample

  1. Example Source
    1. git clone http://github.com/sj-js/sjdoc-maker.git
    2. Sample Source(/sample/sample-packages-source)๋ฅผ ํ™•์ธํ•˜์‹œ๊ณ 
    3. ์ด๋ฅผ ๋นŒ๋“œํ•œ Sample Document(/sample/sample-packages-document)๋ฅผ ํ™•์ธํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.
  2. Check:

1-3. ๊ธฐ๋Šฅ

์†Œ์Šค์ฝ”๋“œ๋ฅผ ํ‘œ์‹œํ•˜๋Š” Markdown ๋ฌธ๋ฒ•์ธ ```์˜ ์œ„์— ๋‹ค์Œ์„ ๋ช…์‹œํ•˜์—ฌ ํŠน์ • ํšจ๊ณผ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

2. Build your documents with SJDoc-maker

SJDoc-maker๋กœ ๋‹น์‹ ์˜ ๋ฌธ์„œ๋ฅผ ์ƒ์„ฑํ•˜์„ธ์š”.

  1. clone project

     git clone http://github.com/sj-js/sjdoc-maker.git
    
     cd ./sjdoc-maker
    
  2. make your build script

    • {ROOT_OF_SJDOCMAKER}/sjdoc-config/sjdoc-sample1.js

        const SjMarkdownManager = require('../SjMarkdownManager');
        const path = require('path');
        /** path to your project source **/
        const TEST_PACKAGE1_SRC = path.resolve(__dirname, '../sample/sample-packages-source/test-package1');          
      
        /** Exports **/
        module.exports = new SjMarkdownManager()
            //ํ†ตํ•ฉ๋ฌธ์„œ๋ฅผ ๊ตฌ๋ถ„์ง“๋Š” ์ด๋ฆ„์„ ์„ค์ •
            .setAlias('sample1')                   
            //ํ†ตํ•ฉ๋ฌธ์„œ์˜ ์‹œ์ž‘ํŽ˜์ด์ง€๋ฅผ ์„ค์ •      
            .setHome('test-package1/index')      
            //ํ†ตํ•ฉ๋ฌธ์„œ ํด๋” ํ•˜์œ„์— ์ƒ์„ฑํ•  `Library๋ณ„ ํด๋”๋ช…`๊ณผ Parsingํ•  `mdํŒŒ์ผ๋“ค`์„ ๋งค์นญ์‹œํ‚ต๋‹ˆ๋‹ค. (Object๊ตฌ์กฐ๋กœ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค.)
            .setLibraryNameAndMarkdownPathsMap({  
                'test-package1': [
                    TEST_PACKAGE1_SRC + '/src/sjdoc/**/*.md'
                ],
            })
            //ํ†ตํ•ฉ๋ฌธ์„œ ํด๋” ํ•˜์œ„์— ์ƒ์„ฑํ•  `Library๋ณ„ ํด๋”๋ช…`๊ณผ ํ•„์š”ํ•œ `js/css ๋“ฑ์˜ ํŒŒ์ผ๋“ค`์„ ๋งค์นญ์‹œํ‚ต๋‹ˆ๋‹ค. (Object๊ตฌ์กฐ๋กœ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค.)
            .setLibraryNameAndPublicDirRawFilesMap({
                'test-package1': [
                    TEST_PACKAGE1_SRC + '/src/js/test1.js'
                ],
            });
      
  3. Build your documents

     npm run build
    

    OR Test your documents

     npm run dev
    
  4. Check your documents

     {ROOT_OF_SJDOCMAKER}/dist