Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: krainboltgreene/library.io
base: 35943e7189
...
head fork: krainboltgreene/library.io
compare: 1f1d96c84c
  • 8 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 45 additions and 4 deletions.
  1. +1 −1  bin/library
  2. +44 −3 lib/library/scaffold.io
View
2  bin/library
@@ -8,6 +8,6 @@ options := System getOptions(arguments)
# `library new [name] [-b|--bin]`
if(arguments size > 1,
- Library Scaffold performWithArgList(arguments second),
+ Library Scaffold performWithArgList(arguments second, arguments, options),
"Show help for library"
)
View
47 lib/library/scaffold.io
@@ -1,5 +1,46 @@
Library Scaffold := Object clone do(
- new := method()
- update := method()
- test := method()
+ new := method(arguments, options,
+ setName(format_name(arguments third))
+ create_root
+ create_directory("lib")
+ create_file("lib", "#{name}.io")
+ create_directory("lib", name)
+ create_file("lib", name, "sample.io")
+ create_directory("test")
+ create_directory("test", name)
+ create_file("test", name, "sample.io")
+ create_directory("ex")
+ create_file("ex", "ex1.io")
+ create_directory("bin")
+ create_file("bin", name)
+ )
+
+ update := method(arguments, options,
+
+ )
+
+ test := method(arguments, options,
+
+ )
+
+ name ::= nil
+
+ create_root := method(
+ Directory createSubdirectory(path)
+ )
+
+ create_directory := method(
+ path := Path with(message arguments) interpolate
+ Directory createSubdirectory(path)
+ )
+
+ create_file := method(
+ path := Path with(message arguments) interpolate
+ template := File with(path) contents interpolate
+
+ )
+
+ format_name := method(name,
+
+ )
)

No commit comments for this range

Something went wrong with that request. Please try again.