This repository was archived by the owner on Dec 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ class Init extends Command
132
132
contents = fs .readFileSync (templateChildPath).toString ()
133
133
contents = @ replacePackageNamePlaceholders (contents, packageName)
134
134
contents = @ replacePackageAuthorPlaceholders (contents, packageAuthor)
135
+ contents = @ replaceCurrentYearPlaceholders (contents)
135
136
fs .writeFileSync (sourcePath, contents)
136
137
137
138
replacePackageAuthorPlaceholders : (string , packageAuthor ) ->
@@ -152,6 +153,9 @@ class Init extends Command
152
153
else if underscore
153
154
@ underscore (packageName)
154
155
156
+ replaceCurrentYearPlaceholders : (string ) ->
157
+ string .replace ' __current_year__' , new Date ().getFullYear ()
158
+
155
159
getTemplatePath : (argv , templateType ) ->
156
160
if argv .template ?
157
161
path .resolve (argv .template )
Original file line number Diff line number Diff line change 1
- Copyright (c) 2016 <Your name here >
1
+ Copyright (c) __ current_year __ <Your name here >
2
2
3
3
Permission is hereby granted, free of charge, to any person obtaining
4
4
a copy of this software and associated documentation files (the
Original file line number Diff line number Diff line change 1
- Copyright (c) 2016 <Your name here >
1
+ Copyright (c) __ current_year __ <Your name here >
2
2
3
3
Permission is hereby granted, free of charge, to any person obtaining
4
4
a copy of this software and associated documentation files (the
Original file line number Diff line number Diff line change 1
- Copyright (c) 2016 <Your name here >
1
+ Copyright (c) __ current_year __ <Your name here >
2
2
3
3
Permission is hereby granted, free of charge, to any person obtaining
4
4
a copy of this software and associated documentation files (the
Original file line number Diff line number Diff line change 1
- Copyright (c) 2016 <Your name here >
1
+ Copyright (c) __ current_year __ <Your name here >
2
2
3
3
Permission is hereby granted, free of charge, to any person obtaining
4
4
a copy of this software and associated documentation files (the
You can’t perform that action at this time.
0 commit comments