alister 1.0.0 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0d1ba1fe8f39f425a504f7e02454b0182b7ba51673c63482fc51ab9c28e6260
4
- data.tar.gz: 4bb178fcfd4f5fc2c12347392e578db460f50924a158ed87518a451a9b43c677
3
+ metadata.gz: 1cd81cc14ddfe50ac97bbf8da56da8ea7bbedf031eae186de74a990b76655866
4
+ data.tar.gz: 3719e5311f3bfb4380192db31907458cc4b6c0feea05f3433bbd78dcdf49166d
5
5
  SHA512:
6
- metadata.gz: 2d3cf3db9d806285fdef30115824650ca7dfe74e5b6ec19482c6a0b0bbcacfd1c15cd44000a4924f5dd42bc1cf720328dcf1b76626f59f693b0346887a9ccbc0
7
- data.tar.gz: cbfc01a0d65870d5648ec1377b4f05c36ceed89e26d41fdf352c5c11a3d35adda63a84633c79cadf51472a680e087959dd9d074aad55ab3368e174dc14d87d8d
6
+ metadata.gz: 7b19e246163e020d92c57746bf72e8971e3e62f65ef9d75bd270d02aa4f2f9535411dd4b55d358a9019efa9b3df92a44e7b662180c78616a7e5247a452076496
7
+ data.tar.gz: 9c9e437e5114b333615dded931809d9a2fb6903f6d90af5a420da14a039c31dbd98642f4d16fb8a49957190124565f4e7b9e031dbb2b905a8511cc70ade101a6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Released]
2
2
 
3
+ ## [1.0.2] - 2025-08-12
4
+
5
+ - Fixed documentation (forgot p is supposed to be para)
6
+
7
+ ## [1.0.1] - 2025-08-12
8
+
9
+ - Removed lib/html/generate_yard_tags.rb from build
10
+
3
11
  ## [1.0.0] - 2025-08-12
4
12
 
5
13
  - Initial release
data/README.md CHANGED
@@ -4,6 +4,20 @@ A super minimal ruby solution to static site generation. This gem allows you to
4
4
 
5
5
  ## Installation
6
6
 
7
+ Install all the dependencies first:
8
+
9
+ For Ubuntu, Debian:
10
+
11
+ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libwebp-dev
12
+
13
+ For Fedora, CentOS:
14
+
15
+ sudo dnf install libjpeg-devel libpng-devel libtiff-devel libwebp-devel
16
+
17
+ For Mac OS:
18
+
19
+ brew install libjpg libpng libtiff webp
20
+
7
21
  Install the gem and add to the application's Gemfile by executing:
8
22
 
9
23
  ```bash
@@ -18,7 +32,26 @@ gem install alister
18
32
 
19
33
  ## Usage
20
34
 
21
- TODO: Write usage instructions here
35
+ ```ruby
36
+ require 'alister'
37
+
38
+ root_page = Alister.html do
39
+ doctype
40
+ html lang: "en" do
41
+ head do
42
+ meta charset: "utf-8"
43
+ meta name: "viewport", content: "width=device-width, initial-scale=1"
44
+ end
45
+ body do
46
+ div id: "app" do
47
+ para "hello world"
48
+ end
49
+ end
50
+ end
51
+ s = Alister::Site.new
52
+ s.route "/", root_page
53
+ s.build "./build"
54
+ ```
22
55
 
23
56
  ## Development
24
57
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alister
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.2'
5
5
  end
data/lib/alister.rb CHANGED
@@ -17,7 +17,7 @@ require_relative 'self'
17
17
  # end
18
18
  # body do
19
19
  # div id: "app" do
20
- # p "hello world"
20
+ # para "hello world"
21
21
  # end
22
22
  # end
23
23
  # end
data/lib/site.rb CHANGED
@@ -35,7 +35,7 @@ module Alister
35
35
  # Creates a new html page on path
36
36
  # @param path [String] route path on where to build
37
37
  # @param page [HTML::Builder, HTML::Element, String] content that will be put inside the page
38
- # return [void]
38
+ # @return [void]
39
39
  def route(path, page)
40
40
  @routes << Page.new(path, page)
41
41
  end
@@ -43,14 +43,14 @@ module Alister
43
43
  # Creates a new file on path
44
44
  # @param path [String] route path on where to build, including the name of the file
45
45
  # @param string [String] content that will be put inside the file
46
- # return [void]
46
+ # @return [void]
47
47
  def file(path, string)
48
48
  @files << Page.new(path, string)
49
49
  end
50
50
 
51
51
  # Builds the site
52
52
  # @param path [String] path on where to build
53
- # return [void]
53
+ # @return [void]
54
54
  def build_to(path)
55
55
  @path = path
56
56
  @routes.each do |route|
@@ -74,14 +74,14 @@ module Alister
74
74
  # file "**/*"
75
75
  # build_to_and_reset "./build/assets/"
76
76
  # end
77
- # return [void]
77
+ # @return [void]
78
78
  def assets(&block)
79
79
  assets = Alister::Assets.new
80
80
  assets.instance_eval(&block)
81
81
  end
82
82
 
83
83
  # Resets the site builder for next build
84
- # return [void]
84
+ # @return [void]
85
85
  def reset
86
86
  @path = nil
87
87
  @routes = []
@@ -90,7 +90,7 @@ module Alister
90
90
 
91
91
  # Builds and then resets the site builder
92
92
  # @param path [String] path on where to build
93
- # return [void]
93
+ # @return [void]
94
94
  def build_to_and_reset(path)
95
95
  build_to(path)
96
96
  reset
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alister
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lain Madeline
@@ -68,18 +68,17 @@ files:
68
68
  - lib/assets.rb
69
69
  - lib/html/builder.rb
70
70
  - lib/html/element.rb
71
- - lib/html/generate_yard_tags.rb
72
71
  - lib/html/html.rb
73
72
  - lib/html/yard_tags.rb
74
73
  - lib/self.rb
75
74
  - lib/site.rb
76
- homepage: https://github.com/Lain62/Alister
75
+ homepage: https://github.com/Lain62/alister
77
76
  licenses:
78
77
  - MIT
79
78
  metadata:
80
- homepage_uri: https://github.com/Lain62/Alister
81
- source_code_uri: https://github.com/Lain62/Alister
82
- changelog_uri: https://github.com/Lain62/Alister/blob/main/CHANGELOG.md
79
+ homepage_uri: https://github.com/Lain62/alister
80
+ source_code_uri: https://github.com/Lain62/alister
81
+ changelog_uri: https://github.com/Lain62/alister/blob/main/CHANGELOG.md
83
82
  rdoc_options: []
84
83
  require_paths:
85
84
  - lib
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # THIS IS JUST TO GENERATE YARD TAGS, IGNORE
4
-
5
- require_relative 'builder'
6
-
7
- str = +"# frozen_string_literal: true\n\n"
8
- str << "module Alister\n"
9
- str << " module HTML\n"
10
- str << " class Builder\n\n"
11
- Alister::HTML::TAGS.each do |tag|
12
- str << " # @!method #{tag}(value = nil, **args, &block)\n"
13
- tag = :p if tag == :para
14
- str << " # Creates a <#{tag}> element and puts it to {#elements}\n"
15
- str << " # @param value [String] The value of the element\n"
16
- str << " # @param args [Hash] The attributes of the element\n"
17
- str << " # @return [void]\n"
18
- str << " # @yield Create child elements of <#{tag}>\n"
19
- str << "\n"
20
- end
21
- str << " end\n"
22
- str << " end\n"
23
- str << "end\n"
24
-
25
- File.delete('./yard_tags.rb') if File.exist? './yard_tags.rb'
26
- file = File.new('./yard_tags.rb', 'w+')
27
- file.write(str)
28
- file.close
29
- puts '[LOG] Created yard_tags.rb'