Skip to content

Commit 99ba019

Browse files
v3.1.1
1 parent 3d49b69 commit 99ba019

File tree

6 files changed

+31
-16
lines changed

6 files changed

+31
-16
lines changed

Classes/Application.rb

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
22
# #
3-
# Bundler and Minimizer for Web files v3.1.0 #
3+
# Bundler and Minimizer for Web files v3.1.1 #
44
# #
55
# Copyright 2017, PedroHenriques #
66
# http://www.pedrojhenriques.com #
@@ -337,7 +337,7 @@ def run()
337337
# calls for the print of the program's outro message
338338
def printOutroMsg()
339339
# print outro message
340-
@cli_obj.printStr("\n=> Thank you for using this application!\nFollow this application at https://github.com/PedroHenriques/Minimizer_CSS-JS\n", false)
340+
@cli_obj.printStr("\n=> Thank you for using this application!\nFollow this application at https://github.com/PedroHenriques/Web_Bundler_Minimizer\n", false)
341341
end
342342

343343
private
@@ -1621,22 +1621,24 @@ def crawlFile(entry_path, output_path_parts, re_pattern, callback)
16211621
callback_return = callback.call(crawl_path, re_match)
16221622

16231623
# check if the lambda function returned a failure or an invalid data type
1624-
if callback_return === false || !callback_return.class.to_s.eql?("String")
1624+
if callback_return === false || !callback_return.class.to_s.eql?("Array")
16251625
# it did
16261626
# something went wrong while executing the lambda function
16271627
# return a failure
16281628
return(false)
16291629
else
16301630
# it didn't
1631-
# check if the file found hasn't been encountered already
1632-
if !imported_abs_paths.include?(callback_return) && !file_queue.include?(callback_return)
1633-
# it hasn't
1634-
# add it to the queue
1635-
file_queue.push(callback_return)
1636-
end
1631+
callback_return.each { |file_path|
1632+
# check if the file found hasn't been encountered already
1633+
if !imported_abs_paths.include?(file_path) && !file_queue.include?(file_path)
1634+
# it hasn't
1635+
# add it to the queue
1636+
file_queue.push(file_path)
1637+
end
16371638

1638-
# add the file found to the crawled file's array of imported files
1639-
@file_crawl_data[crawl_path][:imports].push(callback_return)
1639+
# add the file found to the crawled file's array of imported files
1640+
@file_crawl_data[crawl_path][:imports].push(file_path)
1641+
}
16401642
end
16411643

16421644
# change file_content to have all the text after this match
@@ -1808,7 +1810,9 @@ def crawlSASS(entry_path, output_path_parts)
18081810
def crawlTypeScript(entry_path, output_path_parts)
18091811
# build the lambda function that will be applied to each capture group
18101812
lambda_func = lambda { |crawl_path, re_match|
1811-
return(resolveNodeImportPath(crawl_path, re_match[1], [".tsx", ".ts"]))
1813+
path = resolveNodeImportPath(crawl_path, re_match[1], [".tsx", ".ts"])
1814+
1815+
return(path.class.to_s.eql?("String") ? [path] : path)
18121816
}
18131817

18141818
# check if a path to a tsconfig.json file was provided in the configuration file

Classes/Cli.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
22
# #
3-
# Bundler and Minimizer for Web files v3.1.0 #
3+
# Bundler and Minimizer for Web files v3.1.1 #
44
# #
55
# Copyright 2017, PedroHenriques #
66
# http://www.pedrojhenriques.com #
@@ -56,7 +56,7 @@ def initialize(caller_obj)
5656
@caller_obj = caller_obj
5757

5858
# print the welcome message
59-
printStr("Welcome to the CSS and JS Minimizer program!\nType HELP for a list of commands\n", false)
59+
printStr("Welcome to the Web Bundler and Minimizer program!\nType HELP for a list of commands\n", false)
6060
end
6161

6262
# receives a string to be printed to the console

Includes/autoloader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
22
# #
3-
# Bundler and Minimizer for Web files v3.1.0 #
3+
# Bundler and Minimizer for Web files v3.1.1 #
44
# #
55
# Copyright 2017, PedroHenriques #
66
# http://www.pedrojhenriques.com #

main.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
22
# #
3-
# Bundler and Minimizer for Web files v3.1.0 #
3+
# Bundler and Minimizer for Web files v3.1.1 #
44
# #
55
# Copyright 2017, PedroHenriques #
66
# http://www.pedrojhenriques.com #

release_notes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# RELEASE NOTES
22

3+
## Version 3.1.1
4+
5+
### Changes
6+
7+
- Updated the intro and outro messages
8+
- Renamed the batch file
9+
10+
### Bug Fixes
11+
12+
- Fixed bug that was preventing the program from correctly searching SCSS and SASS entry point files for their imports
13+
314
## Version 3.1.0
415

516
### Changes
File renamed without changes.

0 commit comments

Comments
 (0)