Page 610 - Nodejs 교과서 개정2판
P. 610

౵य೤פ׮
          
         ੉ ݫࢲٜ٘ਸ ઑ೤೧ࢲ ৘ઁ ௏٘୊ۢ ݺ۸যܳ ٜ݅ݶ ؾפ׮


         QBDLBHF KTPO੄ bin ࣘࢿী ࢜۽ ݅ٚ ౵ੌਸ োѾೞҊ ׮द ੹৉ ࢸ஖೤פ׮

          package.json

           {
           		...
           		"bin":	{
           				"cli":	"./command.js"
           		},
           		...
           }



          콘솔

           $	npm	i	-g




         DPNNBOEFSо ӝࠄ੸ਵ۽ ઁҕೞח ২࣌ੋ -v৬ -hܳ ੑ۱೧ࠁѷणפ׮

          콘솔

           $	cli	-v
           0.0.1
           $	cli	-h
           Usage:	cli	[options]


           Options:
           		-v,	--version																		output	the	version	number
           		-h,	--help																					display	help	for	command


           Commands:
           		template|tmpl	[options]	<type>	템플릿을	생성합니다.
           		help	[command]																	display	help	for	command
           $	cli	template	-h
           Usage:	cli	template|tmpl	--name	<name>	--path	[path]


           템플릿을	생성합니다.


           Options:
           		-f,	--filename	[filename]	파일명을	입력하세요.	(default:	"index")
           		-d,	--directory	[path]				생성	경로를	입력하세요	(default:	".")
           		-h,	--help																display	help	for	command
           $	cli	template
   605   606   607   608   609   610   611   612   613   614   615