Skip to content

Commit

Permalink
Merge pull request #107 from ErnestChen1/master
Browse files Browse the repository at this point in the history
【add】添加 package json description
  • Loading branch information
armink committed Nov 8, 2019
2 parents 6bb6983 + 08eedf0 commit 46cabcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmds/cmd_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,10 @@ def package_wizard():
pkgsclass = packageclass[int(classnu) - 1]

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

#fifth step
Expand Down Expand Up @@ -972,7 +972,7 @@ def package_wizard():
f.close()

s = Template(Package_json_file)
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)
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)
f = file(os.path.join(pkg_path, 'package.json'), 'wb')
f.write(package)
f.close()
Expand Down
4 changes: 3 additions & 1 deletion package.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@
"name": "${name}",
"description": "${description}",
"description_zh": "${description_zh}",
"enable": "PKG_USING_${pkgs_using_name}",
"keywords": [
"${keyword}"
],
"category": "${pkgsclass}",
"author": {
"name": "${authorname}",
"email": "${authoremail}"
"email": "${authoremail}",
"github": "${authorname}"
},
"license": "${license}",
"repository": "${repository}",
Expand Down

0 comments on commit 46cabcc

Please sign in to comment.