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
132132 contents = fs .readFileSync (templateChildPath).toString ()
133133 contents = @ replacePackageNamePlaceholders (contents, packageName)
134134 contents = @ replacePackageAuthorPlaceholders (contents, packageAuthor)
135+ contents = @ replaceCurrentYearPlaceholders (contents)
135136 fs .writeFileSync (sourcePath, contents)
136137
137138 replacePackageAuthorPlaceholders : (string , packageAuthor ) ->
@@ -152,6 +153,9 @@ class Init extends Command
152153 else if underscore
153154 @ underscore (packageName)
154155
156+ replaceCurrentYearPlaceholders : (string ) ->
157+ string .replace ' __current_year__' , new Date ().getFullYear ()
158+
155159 getTemplatePath : (argv , templateType ) ->
156160 if argv .template ?
157161 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 >
22
33Permission is hereby granted, free of charge, to any person obtaining
44a 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 >
22
33Permission is hereby granted, free of charge, to any person obtaining
44a 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 >
22
33Permission is hereby granted, free of charge, to any person obtaining
44a 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 >
22
33Permission is hereby granted, free of charge, to any person obtaining
44a copy of this software and associated documentation files (the
You can’t perform that action at this time.
0 commit comments