konstruct 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec56690144a9bfa295c5e4cc565f7f73c3fea9fb
4
- data.tar.gz: 1baf284a2ce48390e87f5472cde3e4d538d3ca0b
3
+ metadata.gz: 1e0f8d6d9d08df5fb4a6e2df306fdacd027e5cb7
4
+ data.tar.gz: fc1a9f444179125cd001e292e99a2f3dcf4c0010
5
5
  SHA512:
6
- metadata.gz: 0c2fe2a8a224f964b70bc1cfb0bf1701333e13b203f1ba4b9afed9a6c74b27bb563597c3a7e2f5429f1f5eb7b5d6691cc99741a8835623fddd41a65f4f27d30e
7
- data.tar.gz: 82999b8b525750fed0364c721f0251486070e69010c6c60f9bc3ac702b1b99dd4af9cd754895058a3008538367d02f579ce24bb1c03434aba190c763d7b4b645
6
+ metadata.gz: 9ba67d6b48d82cb6c0bc42ef1d3b948d04701e524c4fb20f0db5ed9deb230009fc2a9c19610b30a534b97d8e332f85f223a0c6563f4d632b2c17903b96fbc492
7
+ data.tar.gz: 0cbd097cdeea548afb160c85535ac8b8a5097da3212a72d3a5383377ef1db69c350fde198b9918704f4e9a8d28b0ee4fcbb0f4473386c032417ab3be76346df2
data/README.md CHANGED
@@ -9,6 +9,10 @@ The Konstruct Cli provides tools to make working with Konstruct painless and qui
9
9
  You can install Konstruct Cli by running:
10
10
 
11
11
  $ gem install konstruct
12
+
13
+ When it's installed simply run:
14
+
15
+ $ konstruct
12
16
 
13
17
  ## Usage
14
18
 
@@ -40,6 +44,12 @@ This feature is coming soon.
40
44
 
41
45
  Loads up the [Konstruct Documentation](http://konstruct.github.io/) in your default browser.
42
46
 
47
+ #### Init
48
+
49
+ $ konstruct init
50
+
51
+ Initialises the Cli by installing any libraries and extensions you might require to work with Konstruct. This command only runs once (usually when you run `$ konstruct` for the first time), and then simply displays a welcome screen.
52
+
43
53
  ## Contributing
44
54
 
45
55
  Bug reports and pull requests are welcome on GitHub at https://github.com/konstruct/konstruct.cli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -1,21 +1,29 @@
1
- # KONSTRUCT CLI [ UTILITIES ] =========================================================================================
1
+ # KONSTRUCT CLI [ KONSTRUCT MODULE ] ==================================================================================
2
2
 
3
3
  # ====== INDEX =======================================================================================================
4
4
  # ==
5
- # == A. ARTWORK
5
+ # == A. INIT SCRIPT
6
6
  # ==
7
7
  # ====== INDEX =======================================================================================================
8
8
 
9
- # A. ARTWORK ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9
+ # A. INIT SCRIPT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10
10
 
11
- module Util
11
+ module Konstruct
12
12
 
13
- class Art
13
+ class Cli
14
14
 
15
- # B.1. GIT COMMANDS -------------------------------------------------------------------------------------------
16
-
17
- def icon
15
+ def init
18
16
 
17
+ # B.1. INITIALISE FUNCTIONS -------------------------------------------------------------------------------
18
+
19
+ msg = Util::Message.new()
20
+
21
+ # B.1. END ------------------------------------------------------------------------------------------------
22
+
23
+ msg.heading("WELCOME TO THE KONSTRUCT CLI!")
24
+
25
+ # B.2. SHOW THE HELLO SCREEN ------------------------------------------------------------------------------
26
+
19
27
  puts ""
20
28
  puts ""
21
29
  puts Paint[' $III7IIIIIIIIIIIIIIIIIIIIIIIIII: ', "#de544b"]
@@ -44,15 +52,19 @@ module Util
44
52
  puts ""
45
53
  puts Paint[' GO BUILD SOMETHING AWESOME!', "#999999"]
46
54
  puts ""
55
+ puts Paint[' Run "$ konstruct --help" or "$ konstruct documentation" whenever you get stuck!', "#999999"]
56
+ puts ""
57
+
58
+ exit(0)
59
+
60
+ # B.3. END ------------------------------------------------------------------------------------------------
47
61
 
48
62
  end
49
63
 
50
- # B.1. END ----------------------------------------------------------------------------------------------------
51
-
52
64
  end
53
65
 
54
66
  end
55
67
 
56
- # A. END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
68
+ # B. END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
57
69
 
58
- # END OF FILE =========================================================================================================
70
+ # END OF FILE =========================================================================================================
@@ -22,7 +22,6 @@ require 'launchy'
22
22
 
23
23
  #A.2.1. UTILITIES
24
24
 
25
- require_relative 'utilities/artwork'
26
25
  require_relative 'utilities/utils'
27
26
 
28
27
  # A.2.2. CLI SCRIPTS
@@ -30,12 +29,12 @@ require_relative 'utilities/utils'
30
29
  require_relative 'cli/scaffold'
31
30
  require_relative 'cli/skeleton'
32
31
  require_relative 'cli/documentation'
32
+ require_relative 'cli/init'
33
33
 
34
34
  # A.2. END ------------------------------------------------------------------------------------------------------------
35
35
 
36
36
  # A.3. INITIALISE DEPENDENCIES ----------------------------------------------------------------------------------------
37
37
 
38
- art = Util::Art.new()
39
38
  msg = Util::Message.new()
40
39
  fs = Util::FS.new()
41
40
  cli = Konstruct::Cli.new()
@@ -59,7 +58,30 @@ program :description, 'The Konstruct CLI provides scaffolding and other tools to
59
58
 
60
59
  # B.1. END ------------------------------------------------------------------------------------------------------------
61
60
 
62
- # B.2. COMMAND: SKELETON ----------------------------------------------------------------------------------------------
61
+ # B.2. COMMAND: DOCUMENTATION -----------------------------------------------------------------------------------------
62
+
63
+ # -- DESCRIPTION: Launches Konstruct documentation in a browser
64
+
65
+ # -- USAGE: $ konstruct documentation
66
+
67
+ command :init do |c|
68
+
69
+ c.syntax = 'konstruct init'
70
+ c.summary = 'Initialises the Konstruct Cli'
71
+ c.description = 'Initialises the Konstruct Cli by installing libraries and other extensions you might need.'
72
+ c.action do |args, options|
73
+
74
+ cli.init()
75
+
76
+ end
77
+
78
+ end
79
+
80
+ default_command :init
81
+
82
+ # B.2. END ------------------------------------------------------------------------------------------------------------
83
+
84
+ # B.3. COMMAND: SKELETON ----------------------------------------------------------------------------------------------
63
85
 
64
86
  # -- DESCRIPTION: Scaffolds a skeleton project folder structure for you.
65
87
 
@@ -72,8 +94,6 @@ command :skeleton do |c|
72
94
  c.description = 'Builds out a new global project file structure for you to get started with quickly.'
73
95
  c.example 'Structure:', '[1--ci, 2--design, 3--working, 4--www]'
74
96
  c.action do |args, options|
75
-
76
- art.icon()
77
97
 
78
98
  cli.skeleton(projectDir)
79
99
 
@@ -81,9 +101,9 @@ command :skeleton do |c|
81
101
 
82
102
  end
83
103
 
84
- # B.2. END ------------------------------------------------------------------------------------------------------------
104
+ # B.3. END ------------------------------------------------------------------------------------------------------------
85
105
 
86
- # B.3. COMMAND: DOCUMENTATION -----------------------------------------------------------------------------------------
106
+ # B.4. COMMAND: DOCUMENTATION -----------------------------------------------------------------------------------------
87
107
 
88
108
  # -- DESCRIPTION: Launches Konstruct documentation in a browser
89
109
 
@@ -95,8 +115,6 @@ command :documentation do |c|
95
115
  c.summary = 'Launches Konstruct documentation in a browser'
96
116
  c.description = 'Launches Konstruct documentation in a browser'
97
117
  c.action do |args, options|
98
-
99
- art.icon()
100
118
 
101
119
  cli.documentation()
102
120
 
@@ -104,7 +122,7 @@ command :documentation do |c|
104
122
 
105
123
  end
106
124
 
107
- # B.3. END ------------------------------------------------------------------------------------------------------------
125
+ # B.4. END ------------------------------------------------------------------------------------------------------------
108
126
 
109
127
  # B. END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
110
128
 
@@ -1,3 +1,3 @@
1
1
  module Konstruct
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -66,6 +66,8 @@ module Util
66
66
 
67
67
  def heading(msg)
68
68
 
69
+ puts ""
70
+
69
71
  puts Paint["----------------------------------------------------------------------------", :cyan]
70
72
 
71
73
  puts Paint["--", :cyan]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konstruct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Kirsten
@@ -117,11 +117,11 @@ files:
117
117
  - bin/setup
118
118
  - konstruct.gemspec
119
119
  - lib/cli/documentation.rb
120
+ - lib/cli/init.rb
120
121
  - lib/cli/scaffold.rb
121
122
  - lib/cli/skeleton.rb
122
123
  - lib/konstruct.rb
123
124
  - lib/konstruct/version.rb
124
- - lib/utilities/artwork.rb
125
125
  - lib/utilities/commands.rb
126
126
  - lib/utilities/utils.rb
127
127
  homepage: https://github.com/konstruct/konstruct.cli