rubyjs-vite 1.1.3 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rjsv +6 -2
  3. data/lib/option_parser.rb +6 -2
  4. data/lib/rjsv/cli/arguments.rb +77 -0
  5. data/lib/rjsv/cli/plugins.rb +72 -0
  6. data/lib/rjsv/cli/signals.rb +15 -0
  7. data/lib/rjsv/cli/states.rb +68 -0
  8. data/lib/rjsv/constants.rb +8 -0
  9. data/lib/rjsv/core/constants.rb +31 -0
  10. data/lib/rjsv/core/event.rb +24 -0
  11. data/lib/rjsv/core/files.rb +95 -0
  12. data/lib/rjsv/plugin.rb +55 -0
  13. data/lib/rjsv/translate.rb +40 -0
  14. data/lib/rjsv/version.rb +3 -0
  15. data/lib/rjsv/watch.rb +35 -0
  16. data/lib/rjsv.rb +53 -0
  17. data/plugins/scaffold/lib/init.rb +31 -0
  18. data/plugins/scaffold/lib/scaffold/cli/arguments.rb +43 -0
  19. data/plugins/scaffold/lib/scaffold/create.rb +64 -0
  20. data/plugins/scaffold/lib/scaffold/states.rb +40 -0
  21. data/plugins/scaffold/lib/scaffold/vite.rb +13 -0
  22. data/share/scaffold/element/element.js.rb +20 -0
  23. data/share/scaffold/element/init.js.rb +3 -0
  24. data/share/{template → scaffold/web}/.gitignore +2 -0
  25. data/share/{template → scaffold/web}/bin/server +1 -1
  26. data/share/scaffold/web/config/ruby2js.rb +10 -0
  27. data/share/{template → scaffold/web}/index.html +1 -1
  28. data/share/scaffold/web/package.json +14 -0
  29. data/share/scaffold/web/src/js/env.js +1 -0
  30. data/share/scaffold/web/src/rb/core/events.js.rb +20 -0
  31. data/share/scaffold/web/src/rb/core/net.js.rb +12 -0
  32. data/share/scaffold/web/src/rb/core.js.rb +2 -0
  33. data/share/{template/src/rjs/main.rjs → scaffold/web/src/rb/main.js.rb} +2 -0
  34. metadata +49 -34
  35. data/app/arguments.rb +0 -67
  36. data/app/config.rb +0 -11
  37. data/app/main.rb +0 -75
  38. data/app/signals.rb +0 -4
  39. data/lib/description.rb +0 -10
  40. data/lib/ruby_js/code_join.rb +0 -153
  41. data/lib/ruby_js/constants.rb +0 -7
  42. data/lib/ruby_js/helper.rb +0 -50
  43. data/lib/ruby_js/scaffold.rb +0 -52
  44. data/lib/ruby_js/version.rb +0 -3
  45. data/lib/ruby_js.rb +0 -74
  46. data/share/template/.codejoin +0 -8
  47. data/share/template/bin/generate +0 -3
  48. data/share/template/bin/watch +0 -3
  49. data/share/template/package.json +0 -11
  50. /data/share/{template → scaffold/web}/public/vite.svg +0 -0
  51. /data/share/{template → scaffold/web}/src/css/style.css +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 576fb17b237ee647e5d9f84e0ff5cbc365f79e982586ff2e8fa84830e66dbea3
4
- data.tar.gz: 260eefacab7d61466718240bd85c3c3363b469e9b75966a2af746f3790e4f552
3
+ metadata.gz: 0e448860a7ddcb9e6dafe089169a1540b2e02d7b8e579b8ea0c0ff665f9f3970
4
+ data.tar.gz: 07332aaa9d963717b44db9204817dcc24a9ea59dc8024aa818b5cc5edbfa37ba
5
5
  SHA512:
6
- metadata.gz: d1885cc6c4d236704619bb3493e47e831a1221c187f0cbf4b5c08ab031ef8c359466a54cf3a0b92ee909cc8c0509cfa01f080239929e26107a44a3fb499a891d
7
- data.tar.gz: ba9cbe7ef7845fcaef87f8b2bf2b2a16f79733415b8fdf933715075b5a614acb046359b969a45941d63d0094ad4bb3304f6eaa66d43a83ff314da32a43115de9
6
+ metadata.gz: aec8b571b7827c6e7414500e61e89ab4ea01a6d9089a26e0bc0fbfb5207e0170c1cf305fa2e690e3d1874d54dd8c0808e0891c5338e88616078a28c49c2dfed3
7
+ data.tar.gz: 48fefe6f420e47046f03cc2d11c75949840b21b460b613a9a0c4367811f8514e90169e9f78f552f856c785b551188f7dd123214bcedc47365e6a34e21f9adf06
data/bin/rjsv CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- $: << File.expand_path("../lib", __dir__)
3
2
 
3
+ APP_NAME = File.basename($0)
4
4
  ROOT = File.expand_path("..", __dir__)
5
- require_relative "../app/main"
5
+ $: << File.join(ROOT, 'lib')
6
+
7
+ require 'rjsv'
8
+
9
+ RJSV.main()
data/lib/option_parser.rb CHANGED
@@ -62,8 +62,12 @@ class OptionParser
62
62
  end
63
63
  end
64
64
  else
65
- flag = @flags[0]
66
- flag[:block].call
65
+ @flags.each do |flag|
66
+ if flag[:short_flag] == '-h' or flag[:long_flag] == '--help'
67
+ flag[:block].call
68
+ break
69
+ end
70
+ end
67
71
  end
68
72
  end
69
73
 
@@ -0,0 +1,77 @@
1
+ module RJSV
2
+ module CLI
3
+ ##
4
+ # Module for all arguments to the CLI application.
5
+ # The argument initializes the OptionParser,
6
+ # which defines the arguments in detail.
7
+ # It is also nested with a function that adds
8
+ # all arguments from modules.
9
+
10
+ module Arguments
11
+ @options = {
12
+ translate: false,
13
+ watch: false,
14
+ source: Dir.pwd,
15
+ output: Dir.pwd,
16
+ }
17
+
18
+ OptionParser.parse do |parser|
19
+ parser.banner(
20
+ "A transpiler tool that translates code\n" +
21
+ "from Ruby to JS language and transforms it into\n" +
22
+ "files that are readable by browsers.\n\n" +
23
+ "Usage: #{APP_NAME} [options]\n" +
24
+ "\nOptions:"
25
+ )
26
+
27
+ Plugins.add_arguments(parser)
28
+
29
+ parser.on( "-w", "--watch", "Monitors all RB files in real time\n" +
30
+ "to see if they have been modified." ) do
31
+ @options[:watch] = true
32
+ end
33
+ parser.on( "-t", "--translate", "It translates all loaded RB files\n" +
34
+ "into JavaScript code and stores them\n" +
35
+ "in certain type files." ) do
36
+ @options[:translate] = true
37
+ end
38
+ parser.on("-s DIR", "--source DIR", "The path of the source folder where\n" +
39
+ "all RB files are found (example of\n" +
40
+ "ending file type *.js.#{RJSV::Constants::SUFFIX_RB}).\n") do |dir|
41
+ @options[:source] = dir
42
+ end
43
+ parser.on("-o DIR", "--output DIR", "The path of the output folder where\n" +
44
+ "all Ruby codes will be translated into\n" +
45
+ "JavaScript with the prepared file type." ) do |dir|
46
+ @options[:output] = dir
47
+ end
48
+
49
+ parser.on( "-h", "--help", "Show help" ) do
50
+ puts parser
51
+ exit
52
+ end
53
+ parser.on( "-v", "--version", "Show version" ) do
54
+ puts "Version is #{RJSV::VERSION}"
55
+ exit
56
+ end
57
+ end
58
+
59
+ ##
60
+ # Options is a get method and gets
61
+ # all options from arguments.
62
+
63
+ def self.options
64
+ @options
65
+ end
66
+
67
+ ##
68
+ # It finds out if the plugin is written in the argument.
69
+
70
+ def self.active_plugin?
71
+ unless ARGV.empty?
72
+ return ARGV[0].index(/^-/) == nil
73
+ end
74
+ end
75
+ end#Arguments
76
+ end
77
+ end
@@ -0,0 +1,72 @@
1
+ module RJSV
2
+ module CLI
3
+ ##
4
+ # This is the module that handles plugins so
5
+ # that they are found, imported and inizialized.
6
+
7
+ module Plugins
8
+ PLUGIN_INFO = "(this is a plugin)"
9
+
10
+ module_function
11
+
12
+ ##
13
+ # Finds all init.rb files in the plugins folder.
14
+ # Otherwise, the absolute path is determined
15
+ # by the Dir.pwd() method.
16
+
17
+ def find_all_init(path = Dir.pwd)
18
+ l_path = lambda { |p| File.join(p, 'plugins', '**', 'init.rb') }
19
+ Dir.glob [
20
+ l_path.call(path),
21
+ l_path.call(ROOT),
22
+ l_path.call(File.join(Dir.home, '.rjsv'))
23
+ ]
24
+ end
25
+
26
+ ##
27
+ # Imports all found init.rb files into Ruby script.
28
+ #
29
+ # Returns the classes that are imported,
30
+ # otherwise returns an empty array.
31
+
32
+ def require_all_init()
33
+ find_all_init().each do |plugin_index_path|
34
+ require plugin_index_path
35
+ end
36
+
37
+ if defined?(RJSV::Plugins)
38
+ return Core::Constants.get_classes(RJSV::Plugins)
39
+ end
40
+
41
+ return []
42
+ end
43
+
44
+ ##
45
+ # Adds a plugin argument and initializes its nested arguments.
46
+ #
47
+ # It chooses the name and description of the argument
48
+ # to be the one written on behalf of the plugin,
49
+ # which is found from the RJSV::Plugin class.
50
+
51
+ def add_arguments(parser)
52
+ @classes.each_with_index do |plugin_class, i|
53
+ begin
54
+ if plugin_class
55
+ plugin = plugin_class.new
56
+ parser.on(plugin.name, "", "#{plugin.description}\n" +
57
+ "#{PLUGIN_INFO}#{"\n" if @classes.length == i+1}" ) do
58
+ plugin.arguments()
59
+ plugin.init()
60
+ end
61
+ end
62
+ rescue => exception
63
+ Core::Event.print('class', "The program found the '#{plugin_class.name}' class, " +
64
+ "but its arguments cannot be created.\n\n")
65
+ end
66
+ end
67
+ end#add_arguments
68
+
69
+ @classes = require_all_init()
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,15 @@
1
+ module RJSV
2
+ module CLI
3
+ ##
4
+ # Dedicated to all signals for Unix system.
5
+ # Here we find the signal for INT.
6
+
7
+ module Signals
8
+ Signal.trap("INT") do
9
+ puts
10
+ Core::Event.print("exiting")
11
+ exit
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,68 @@
1
+ module RJSV
2
+ module CLI
3
+ ##
4
+ # Here are the code blocks that are activated when
5
+ # the main function is triggered.
6
+ # Functions communicate using arguments passed via
7
+ # the command line, which are passed as options_cli.
8
+ # These functions include translate and watch,
9
+ # which can be reused when creating custom plugins.
10
+
11
+ module States
12
+ module_function
13
+
14
+ ##
15
+ # Block of code that handles the transpilation of script.
16
+ # This is opening a Ruby script container file,
17
+ # which is then converted into a JavaScript file.
18
+ # The file is saved to the output path.
19
+
20
+ def translate_state(path, options_cli)
21
+ if options_cli[:translate]
22
+ content_ruby = Core::Files.open(path)
23
+ if content_ruby && path
24
+ path_output = Core::Files.change_path_to_output(path, options_cli)
25
+ RJSV::Translate.ruby_to_js_with_write(content_ruby, path_output) do |err|
26
+ Core::Event.print('error', "#{path.sub(File.join(Dir.pwd, ''), '')} #{err}")
27
+ return
28
+ end
29
+ Core::Event.print('translated', path_output)
30
+ end
31
+ end
32
+ end
33
+
34
+ ##
35
+ # Block of code that tracks files under the input path.
36
+ # If a file has been logged, several events are performed
37
+ # such as to add, modify and remove logged files.
38
+ # These then trigger procedural methods to process the requests.
39
+
40
+ def watch_state(options_cli)
41
+ if options_cli[:watch]
42
+ Core::Event.print('message', 'There is now a watch for edited files.')
43
+ RJSV::Watch.modified_files(options_cli[:source]) do |modified, added, removed|
44
+ unless added.empty?
45
+ added.each do |path|
46
+ translate_state(path, options_cli)
47
+ end
48
+ end
49
+
50
+ unless modified.empty?
51
+ modified.each do |path|
52
+ translate_state(path, options_cli)
53
+ end
54
+ end
55
+
56
+ unless removed.empty?
57
+ removed.each do |path|
58
+ path_output = Core::Files.change_path_to_output(path, options_cli)
59
+ Core::Files.remove(path_output)
60
+ Core::Event.print('deleted', path_output)
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end#watch_state
66
+ end#States
67
+ end
68
+ end
@@ -0,0 +1,8 @@
1
+ module RJSV
2
+ ##
3
+ # All constant variables.
4
+
5
+ module Constants
6
+ SUFFIX_RB = 'rb'
7
+ end
8
+ end
@@ -0,0 +1,31 @@
1
+ module RJSV
2
+ module Core
3
+ ##
4
+ # The module is reserved for handling classes and modules.
5
+ # Thus, it is a manipulation of constant keywords.
6
+
7
+ module Constants
8
+ module_function
9
+
10
+ ##
11
+ # This method tries to find already initialized
12
+ # classes from the mod (module) using the abstract
13
+ # class RJSV::Plugin. It returns an array of classes.
14
+
15
+ def get_classes(mod)
16
+ mod.constants.map do |c|
17
+ const = mod.const_get(c)
18
+
19
+ if const.is_a?(Class) &&
20
+ const.superclass.name == 'RJSV::Plugin'
21
+ const
22
+ elsif const.is_a? Module
23
+ get_classes(const)
24
+ else
25
+ next
26
+ end
27
+ end.flatten.compact
28
+ end#get_classes
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,24 @@
1
+ module RJSV
2
+ module Core
3
+ ##
4
+ # Event module for handling fifo events. This is
5
+ # so far a module for just the basic event
6
+ # printing element.
7
+
8
+ module Event
9
+ module_function
10
+
11
+ ##
12
+ # Prints an event type using the puts() method
13
+ # that shows the time, cli application name,
14
+ # event and event message.
15
+
16
+ def print(event, message = "")
17
+ supplement = message.empty? ? message : " | #{message}"
18
+
19
+ puts "#{Time.now.strftime("%l:%M:%S %p").lstrip} " +
20
+ "[#{APP_NAME}] #{event.upcase}#{supplement}"
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,95 @@
1
+ module RJSV
2
+ module Core
3
+ ##
4
+ # The file module ensures safe handling of files.
5
+ # It always checks if a file really exists on
6
+ # the input path or if a certain folder exists
7
+ # on the output path. It can also change
8
+ # the absolute path or find all necessary files
9
+ # for further manipulation.
10
+
11
+ module Files
12
+ require 'fileutils'
13
+
14
+ module_function
15
+
16
+ ##
17
+ # Opens the file securely and returns the content
18
+ # from the file. If the file does not exist,
19
+ # it returns nil.
20
+
21
+ def open(path)
22
+ if File.exist? path
23
+ File.open path do |f|
24
+ return f.read
25
+ end
26
+ end
27
+
28
+ return nil
29
+ end
30
+
31
+ ##
32
+ # Stores the file with the assigned container
33
+ # by safely discovering its folder and, if necessary,
34
+ # creating it when it does not exist in the path.
35
+ # It can also be assigned a file write mode.
36
+
37
+ def write_with_dir(content, path, mode = 'w+')
38
+ unless Dir.exist? File.dirname(path)
39
+ FileUtils.mkdir_p File.dirname(path)
40
+ end
41
+
42
+ File.open path, mode do |f|
43
+ f.write(content)
44
+ end
45
+ end
46
+
47
+ ##
48
+ # Safely removes the file from the path.
49
+ # If the file is the last one in the folder,
50
+ # the folder is also deleted with the file.
51
+
52
+ def remove(path)
53
+ File.delete(path) if File.exist?(path)
54
+ path_dir = File.dirname(path)
55
+ Dir.delete(path_dir) if Dir.empty?(path_dir)
56
+ end
57
+
58
+ ##
59
+ # The method is special in that it examines arguments
60
+ # from the CLI and modifies the definition
61
+ # path for the output path.
62
+
63
+ def change_path_to_output(path, options_cli)
64
+ path.sub(options_cli[:source], options_cli[:output])
65
+ .sub(/\.#{RJSV::Constants::SUFFIX_RB}$/, '')
66
+ .sub(File.join(Dir.pwd(), ''), '')
67
+ end
68
+
69
+ ##
70
+ # Finds all files with the extension '.*.rb'
71
+ # from the defined path.
72
+
73
+ def find_all(path)
74
+ path_all = File.join(path, '**', '*')
75
+ Dir.glob("#{path_all}.*.#{RJSV::Constants::SUFFIX_RB}")
76
+ end
77
+
78
+ ##
79
+ # Copies all files from the input path to the
80
+ # output path. This is a method that copies all
81
+ # files even those that are invisible to the
82
+ # UNIX system (dot file).
83
+
84
+ def copy(path_input, path_output)
85
+ files = Dir.glob("#{path_input}/**/*", File::FNM_DOTMATCH)
86
+ .select { |f| File.file?(f) }
87
+ files.each do |path_file|
88
+ path_cp = path_file.sub(path_input, path_output)
89
+ FileUtils.mkdir_p File.dirname(path_cp)
90
+ FileUtils.cp(path_file, path_cp)
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,55 @@
1
+ module RJSV
2
+ ##
3
+ # Abstract 'class' for creating initialization plagins.
4
+ # They are teachable for defining basic information
5
+ # and is the starting point for triggering functions
6
+ # using the init() function. If we are creating
7
+ # a custom plugin, we need to inherit this 'class'
8
+ # into its own 'class'.
9
+
10
+ class Plugin
11
+ ##
12
+ # Description of the plugin that is printed to the CLI during help.
13
+
14
+ def description
15
+ abstract_error('description()')
16
+ end
17
+
18
+ ##
19
+ # This function is not mandatory and automatically
20
+ # defines the 'module' name according to
21
+ # the plugin 'module'.
22
+
23
+ def name
24
+ self.class.name.split('::')[-2].downcase
25
+ end
26
+
27
+ ##
28
+ # The method should pass an initialization
29
+ # method for all arguments of this plugin.
30
+
31
+ def arguments
32
+ abstract_error('arguments()')
33
+ end
34
+
35
+ ##
36
+ # The method that is the main initialization
37
+ # block for the code that the plugin
38
+ # should execute.
39
+
40
+ def init
41
+ abstract_error('init()')
42
+ end
43
+
44
+ private
45
+ ##
46
+ # A private method that raises an error
47
+ # message about an abstract class with
48
+ # a function name.
49
+
50
+ def abstract_error(fn_name)
51
+ raise "The '#{fn_name}' method is abstract, " +
52
+ "it needs to be implemented in a nested '#{self.class.name}' class."
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,40 @@
1
+ module RJSV
2
+ ##
3
+ # Here we can load everything necessary for
4
+ # the transpilation process of Ruby script into JavaScript.
5
+ # The transpilation process uses the Ruby2JS library.
6
+ # The transpilation is safe and catches error messages
7
+ # if the Ruby script has been written incorrectly.
8
+
9
+ module Translate
10
+ require 'ruby2js'
11
+
12
+ module_function
13
+
14
+ ##
15
+ # Converts Ruby script to JavaScript using Ruby2JS library.
16
+ # If an error occurs during transpilation, the error
17
+ # message is raised in the next nested code block.
18
+
19
+ def ruby_to_js(content_ruby, &block)
20
+ begin
21
+ return Ruby2JS.convert(content_ruby)
22
+ rescue => exception
23
+ block.call(exception) if block
24
+ return nil
25
+ end
26
+ end
27
+
28
+ ##
29
+ # Converts Ruby script to JavaScript using Ruby2JS library.
30
+ # The final transpilation is followed by saving it to
31
+ # a file with a predefined path.
32
+
33
+ def ruby_to_js_with_write(content_ruby, path, &block)
34
+ content_js = ruby_to_js(content_ruby) do |err|
35
+ block.call(err) if block
36
+ end
37
+ Core::Files.write_with_dir(content_js, path) if content_js
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,3 @@
1
+ module RJSV
2
+ VERSION = '2.0.1'
3
+ end
data/lib/rjsv/watch.rb ADDED
@@ -0,0 +1,35 @@
1
+ module RJSV
2
+ ##
3
+ # Module for real-time monitoring of files on
4
+ # the local disk. It uses the 'listen' library
5
+ # for this function. There is only one method
6
+ # that can be loaded here which triggers everything.
7
+
8
+ module Watch
9
+ require "listen"
10
+
11
+ module_function
12
+
13
+ ##
14
+ # Tracks modified files in the path that is
15
+ # defined as the source directory. When this
16
+ # function is called, the event listener is triggered
17
+ # for events such as modified, added, and deleted
18
+ # file events. Therefore, the method can put
19
+ # the application to sleep and silently monitor
20
+ # the event process. It watches all files with
21
+ # extension '.*.rb', which asterisk means
22
+ # any sub extension such as '.js'.
23
+
24
+ def modified_files(path, &block)
25
+ listener = Listen.to(path,
26
+ only: /\..*\.#{Constants::SUFFIX_RB}$/
27
+ ) do |m, a, r|
28
+
29
+ block.call(m, a, r) if block
30
+ end
31
+ listener.start
32
+ sleep
33
+ end
34
+ end
35
+ end
data/lib/rjsv.rb ADDED
@@ -0,0 +1,53 @@
1
+ require 'option_parser'
2
+ require 'json_parser'
3
+
4
+ require 'rjsv/version'
5
+ require 'rjsv/constants'
6
+ require 'rjsv/plugin'
7
+
8
+ require 'rjsv/core/event'
9
+ require 'rjsv/core/files'
10
+ require 'rjsv/core/constants'
11
+
12
+ require 'rjsv/translate'
13
+ require 'rjsv/watch'
14
+
15
+ require 'rjsv/cli/states'
16
+ require 'rjsv/cli/signals'
17
+ require 'rjsv/cli/plugins'
18
+ require 'rjsv/cli/arguments'
19
+
20
+ ##
21
+ # This is the main initialization module of
22
+ # all modules that are needed for the functionality
23
+ # of this RubyJS-Vite transpiler. The methods that
24
+ # shape the direction of the application are
25
+ # also written here.
26
+
27
+ module RJSV
28
+ @options_cli = CLI::Arguments.options
29
+
30
+ module_function
31
+
32
+ ##
33
+ # This is the main function to run the desired
34
+ # block function scenarios. In order to arm itself
35
+ # regarding plugins and directly Arguments,
36
+ # this method checks the accessibility of the plugin
37
+ # by checking if it is active or attached in
38
+ # the argument given by the confirmed command
39
+ # from the terminal.
40
+
41
+ def main()
42
+ unless CLI::Arguments.active_plugin?
43
+ if @options_cli[:translate]
44
+ files_rb = Core::Files.find_all(@options_cli[:source])
45
+ files_rb.each do |path|
46
+ CLI::States.translate_state(path, @options_cli)
47
+ end
48
+ end
49
+
50
+ CLI::States.watch_state(@options_cli)
51
+ end
52
+ end#main
53
+ end
@@ -0,0 +1,31 @@
1
+ module RJSV
2
+ module Plugins
3
+ module Scaffold
4
+ require_relative './scaffold/cli/arguments'
5
+
6
+ require_relative './scaffold/vite'
7
+ require_relative './scaffold/states'
8
+ require_relative './scaffold/create'
9
+
10
+ class Init < RJSV::Plugin
11
+ def initialize
12
+ @arguments_cli = RJSV::Plugins::Scaffold::CLI::Arguments
13
+ end
14
+
15
+ def description
16
+ "Scaffolding can create new\n" +
17
+ "projects or create new elements."
18
+ end
19
+
20
+ def arguments
21
+ @arguments_cli.init(self)
22
+ end
23
+
24
+ def init()
25
+ Scaffold::States.create_web_state(@arguments_cli.options)
26
+ Scaffold::States.create_element_state(@arguments_cli.options)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end