๐Ÿงฑ Mason CLI๋กœ ํ…œํ”Œ๋ฆฟ ๋งŒ๋“ค๊ธฐ

3300 ๋‹จ์–ด templatepackageflutter
๐Ÿ‡ซ๐Ÿ‡ท French version

ํ…œํ”Œ๋ฆฟ ๋ฐ ๊ทœ์น™



๐Ÿง‘โ€๐Ÿ’ป ๊ฐœ๋ฐœ์ž์˜ ์ž„๋ฌด๋Š” ์ด๋ฏธ ์กด์žฌํ•˜๋Š” ์Šค๋‹ˆํŽซ์„ ๋ณต์‚ฌํ•˜์—ฌ ๋ถ™์—ฌ๋„ฃ๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ƒˆ ํ”„๋กœ์ ํŠธ๋งˆ๋‹ค ๋ฐ”ํ€ด๋ฅผ ์žฌ๋ฐœ๋ช…ํ•˜๋Š” ์ด์œ ๋Š” ๋ฌด์—‡์ž…๋‹ˆ๊นŒ?

ํ…œํ”Œ๋ฆฟ ๋˜๋Š” ์ƒ์šฉ๊ตฌ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๊ฒฌ๊ณ ํ•œ ์ฝ”๋“œ ๊ธฐ๋ฐ˜์œผ๋กœ ํ”„๋กœ์ ํŠธ ๋˜๋Š” ์ƒˆ ๊ธฐ๋Šฅ์„ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ…œํ”Œ๋ฆฟ ์‚ฌ์šฉ์„ ์šฉ์ดํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด BrickHub์—์„œ๋Š” ์ƒˆ๋กœ์šด ๋„๊ตฌ์ธ Mason CLI์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.



โžก๏ธ CLI๋ฅผ ํ†ตํ•ด ํ”„๋กœ์ ํŠธ์—์„œ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ฒฝ๋Œ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค๋Š” ์•ฝ์†์€ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. (๋ช…๋ น์ค„ ์ธํ„ฐํŽ˜์ด์Šค)

๐Ÿงฑ ๋ธŒ๋ฆญ์€ ๋‹ค์–‘ํ•œ ๋งค๊ฐœ๋ณ€์ˆ˜์— ๋”ฐ๋ผ ์ƒ์„ฑ๋  ์ˆ˜ ์žˆ๋Š” ํŒŒ์ผ ์„ธํŠธ์ž…๋‹ˆ๋‹ค.



Usage of the hello brick



flutter_getx์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ธŒ๋ฆญbrickhub์„ ์‚ฌ์šฉํ•˜๋ฉด GetX ์•„ํ‚คํ…์ฒ˜๋กœ Flutter ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•œ ๋ช‡ ๊ฐ€์ง€ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์œผ๋กœ ์ถฉ๋ถ„ํ•ฉ๋‹ˆ๋‹ค.



Addition of the brick flutter_getx and usage



๐Ÿ‘‰ ํ…œํ”Œ๋ฆฟ์„ ์‚ฌ์šฉํ•˜๋ฉด ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ์„ ๊ฐ„์†Œํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฒฝ๋Œ์„ ๊ฑด๋ฌผ๋กœ ๊ฐ€์ ธ์˜ค์„ธ์š”



โž• ์ปค์Šคํ…€ ๋ธŒ๋ฆญ์„ ์ƒ์„ฑํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋ช…๋ น์„ ์ž…๋ ฅํ•œ ํ›„ ์ƒ์„ฑํ•  ๋ชจ๋“  ํŒŒ์ผ์„ __brick__ ๋””๋ ‰ํ† ๋ฆฌ์— ๋ฐฐ์น˜ํ•˜์‹ญ์‹œ์˜ค.

mason new <BRICK_NAME>




Example of using the command mason new





Architecture of a new brick



โ„น๏ธ brick.yaml ํŒŒ์ผ์—๋Š” ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  ๋ธŒ๋ฆญ์ด ๋‚˜์—ด๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿฅธ mustache ํ‘œ๊ธฐ๋ฒ•์€ ํŒŒ์ผ์— ๋ณ€์ˆ˜๋ฅผ ์ฃผ์ž…ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

Hello {{name}}!


๐Ÿ–ฅ ๋ธŒ๋ฆญ์ด ์ƒ์„ฑ๋˜๋ฉด ๋‹ค๋ฅธ ์‚ฌ์šฉ์ž๊ฐ€ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก brickhub์— ๊ฒŒ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ „๋ฌธ์ ์ธ ํ™˜๊ฒฝ์—์„œ ํ”„๋กœ์ ํŠธ์˜ .mason ํด๋”์— ๋“ฑ๋ก๋œ ๋ธŒ๋ฆญ์˜ ์ฐธ์กฐ๋ฅผ ๋ณ€๊ฒฝํ•˜์—ฌ ๋‹ค๋ฅธ ๊ณณ์—์„œ ๋ธŒ๋ฆญ์„ ํ˜ธ์ŠคํŒ…ํ•œ ๋‹ค์Œ ์ˆ˜๋™์œผ๋กœ ํ”„๋กœ์ ํŠธ์— ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“‘ ์ปค์Šคํ…€ ๋ธŒ๋ฆญ ์ƒ์„ฑ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๊ณต์‹ ๋ฌธ์„œ์—์„œ ์ž˜ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค โ†’ https://pub.dev/packages/mason_cli

๊ทธ๋ฆฌ๊ณ  ์ง€๊ธˆ ? ๋‚จ์€ ๊ฒƒ์€ ๋„๊ตฌ์˜ ์„ฑ๋Šฅ์„ ํ…Œ์ŠคํŠธํ•˜๋Š” ๊ฒƒ๋ฟ์ž…๋‹ˆ๋‹ค. ์•„๋งˆ๋„ ๋‹ค์Œ ํ”„๋กœ์ ํŠธ์—์„œ ์‚ฌ์šฉํ•  ๊ฒƒ์ž…๋‹ˆ๊นŒ?

์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ