Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class Init extends Command
contents = fs.readFileSync(templateChildPath).toString()
contents = @replacePackageNamePlaceholders(contents, packageName)
contents = @replacePackageAuthorPlaceholders(contents, packageAuthor)
contents = @replaceCurrentYearPlaceholders(contents)
fs.writeFileSync(sourcePath, contents)

replacePackageAuthorPlaceholders: (string, packageAuthor) ->
Expand All @@ -152,6 +153,9 @@ class Init extends Command
else if underscore
@underscore(packageName)

replaceCurrentYearPlaceholders: (string) ->
string.replace '__current_year__', new Date().getFullYear()

getTemplatePath: (argv, templateType) ->
if argv.template?
path.resolve(argv.template)
Expand Down
2 changes: 1 addition & 1 deletion templates/language/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 <Your name here>
Copyright (c) __current_year__ <Your name here>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion templates/package-coffeescript/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 <Your name here>
Copyright (c) __current_year__ <Your name here>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion templates/package-javascript/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 <Your name here>
Copyright (c) __current_year__ <Your name here>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion templates/theme/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 <Your name here>
Copyright (c) __current_year__ <Your name here>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down