@@ -66,13 +66,16 @@ CreateController = function(controller_name)
66
66
template = ProcessTemplate (template , words )
67
67
Barf (" app/controllers/" .. words .plural .. " _controller.lua" , template )
68
68
Barf (" specs/controllers/" .. words .plural .. " _spec.lua" , spec )
69
+ print (" ✅ app/controller/" .. words .plural .. " _controller.lua created" )
70
+ print (" ✅ specs/controllers/" .. words .plural .. " _spec.lua created" )
69
71
end
70
72
71
73
CreateMigration = function (name )
72
74
local words = DefineWords (name )
73
75
local template = Slurp (" .templates/migration.lua" )
74
76
template = ProcessTemplate (template , words )
75
77
Barf (" migrations/" .. os.date (" %Y%m%d-%H%I%S_" ) .. Slugify (name ) .. " .lua" , template )
78
+ print (" ✅ migrations/" .. os.date (" %Y%m%d-%H%I%S_" ) .. Slugify (name ) .. " .lua created" )
76
79
end
77
80
78
81
CreateModel = function (model_name )
@@ -83,9 +86,12 @@ CreateModel = function(model_name)
83
86
Barf (" app/models/" .. words .singular .. " .lua" , template )
84
87
Barf (" specs/models/" .. words .singular .. " _spec.lua" , spec )
85
88
CreateMigration (" create " .. words .plural .. " table" )
89
+ print (" ✅ app/models/" .. words .singular .. " .lua created" )
90
+ print (" ✅ specs/models/" .. words .singular .. " _spec.lua created" )
86
91
end
87
92
88
93
if arg [1 ] == " create" then
94
+ print (" create" )
89
95
if arg [2 ] == " migration" then
90
96
CreateMigration (arg [3 ])
91
97
end
@@ -99,8 +105,9 @@ if arg[1] == "create" then
99
105
end
100
106
101
107
if arg [2 ] == " scaffold" then
108
+ print (" scaffold" )
102
109
singular = Singularize (arg [3 ])
103
-
110
+ print ( singular )
104
111
CreateController (singular )
105
112
CreateView (singular )
106
113
CreateModel (singular )
0 commit comments