|
@@ -394,10 +394,11 @@ describe("{}", () => {{
|
|
|
)
|
|
|
}
|
|
|
|
|
|
-pub fn package_json(jest: bool) -> String {
|
|
|
+pub fn package_json(jest: bool, license: String) -> String {
|
|
|
if jest {
|
|
|
format!(
|
|
|
r#"{{
|
|
|
+ "license": "{license}",
|
|
|
"scripts": {{
|
|
|
"lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
|
|
|
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
|
|
@@ -415,6 +416,7 @@ pub fn package_json(jest: bool) -> String {
|
|
|
} else {
|
|
|
format!(
|
|
|
r#"{{
|
|
|
+ "license": "{license}",
|
|
|
"scripts": {{
|
|
|
"lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
|
|
|
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
|
|
@@ -433,10 +435,11 @@ pub fn package_json(jest: bool) -> String {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-pub fn ts_package_json(jest: bool) -> String {
|
|
|
+pub fn ts_package_json(jest: bool, license: String) -> String {
|
|
|
if jest {
|
|
|
format!(
|
|
|
r#"{{
|
|
|
+ "license": "{license}",
|
|
|
"scripts": {{
|
|
|
"lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
|
|
|
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
|
|
@@ -458,6 +461,7 @@ pub fn ts_package_json(jest: bool) -> String {
|
|
|
} else {
|
|
|
format!(
|
|
|
r#"{{
|
|
|
+ "license": "{license}",
|
|
|
"scripts": {{
|
|
|
"lint:fix": "prettier */*.js \"*/**/*{{.js,.ts}}\" -w",
|
|
|
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
|