Skip to content

Commit 46cabcc

Browse files
authored
Merge pull request #107 from ErnestChen1/master
【add】添加 package json description
2 parents 6bb6983 + 08eedf0 commit 46cabcc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cmds/cmd_package.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,10 +922,10 @@ def package_wizard():
922922
pkgsclass = packageclass[int(classnu) - 1]
923923

924924
#fourth step
925-
print ('\033[5;33;40m\n4.Please input author name of this package :\033[0m')
925+
print ("\033[5;33;40m\n4.Please input author's github ID of this package :\033[0m")
926926
authorname = raw_input()
927927
while authorname == '':
928-
print ('\033[1;31;40mError: you must input author name of this package. Try again.\033[0m')
928+
print ("\033[1;31;40mError: you must input author's github ID of this package. Try again.\033[0m")
929929
authorname = raw_input()
930930

931931
#fifth step
@@ -972,7 +972,7 @@ def package_wizard():
972972
f.close()
973973

974974
s = Template(Package_json_file)
975-
package = s.substitute(name=name, pkgsclass=pkgsclass,authorname=authorname,authoremail=authoremail, description=description, description_zh=description_zh,version=ver, keyword=keyword,license=license, repository=repository)
975+
package = s.substitute(name=name, pkgsclass=pkgsclass,authorname=authorname,authoremail=authoremail, description=description, description_zh=description_zh,version=ver, keyword=keyword,license=license, repository=repository, pkgs_using_name=uppername)
976976
f = file(os.path.join(pkg_path, 'package.json'), 'wb')
977977
f.write(package)
978978
f.close()

package.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,15 @@
8484
"name": "${name}",
8585
"description": "${description}",
8686
"description_zh": "${description_zh}",
87+
"enable": "PKG_USING_${pkgs_using_name}",
8788
"keywords": [
8889
"${keyword}"
8990
],
9091
"category": "${pkgsclass}",
9192
"author": {
9293
"name": "${authorname}",
93-
"email": "${authoremail}"
94+
"email": "${authoremail}",
95+
"github": "${authorname}"
9496
},
9597
"license": "${license}",
9698
"repository": "${repository}",

0 commit comments

Comments
 (0)