mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 09:50:05 +08:00
pulled Node config params and Shape config params into a textfile, and now using token replacement to auto fill Node and Shape config params throughout the code base. In this way, if I need to make changes to the Node or Shape configs, those changes are propagated to all of the other constructors
This commit is contained in:
9
Thorfile
9
Thorfile
@@ -143,11 +143,10 @@ class Build < Thor
|
||||
def replace_tokens(content, version)
|
||||
date = Time.now.strftime("%b %d %Y")
|
||||
|
||||
# Add the version number
|
||||
content.gsub!("@version", version)
|
||||
|
||||
# Add the date
|
||||
content.sub!("@date", date)
|
||||
content.gsub!("{{version}}", version)
|
||||
content.sub!("{{date}}", date)
|
||||
content.gsub!("{{NodeParams}}", IO.read("configParams/NodeParams.txt"))
|
||||
content.gsub!("{{ShapeParams}}", IO.read("configParams/ShapeParams.txt"))
|
||||
|
||||
return content
|
||||
end
|
||||
|
Reference in New Issue
Block a user