Skip to content

Commit

Permalink
v3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroHenriques committed Sep 5, 2017
1 parent 3d49b69 commit 99ba019
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
28 changes: 16 additions & 12 deletions Classes/Application.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Bundler and Minimizer for Web files v3.1.0 #
# Bundler and Minimizer for Web files v3.1.1 #
# #
# Copyright 2017, PedroHenriques #
# http://www.pedrojhenriques.com #
Expand Down Expand Up @@ -337,7 +337,7 @@ def run()
# calls for the print of the program's outro message
def printOutroMsg()
# print outro message
@cli_obj.printStr("\n=> Thank you for using this application!\nFollow this application at https://github.com/PedroHenriques/Minimizer_CSS-JS\n", false)
@cli_obj.printStr("\n=> Thank you for using this application!\nFollow this application at https://github.com/PedroHenriques/Web_Bundler_Minimizer\n", false)
end

private
Expand Down Expand Up @@ -1621,22 +1621,24 @@ def crawlFile(entry_path, output_path_parts, re_pattern, callback)
callback_return = callback.call(crawl_path, re_match)

# check if the lambda function returned a failure or an invalid data type
if callback_return === false || !callback_return.class.to_s.eql?("String")
if callback_return === false || !callback_return.class.to_s.eql?("Array")
# it did
# something went wrong while executing the lambda function
# return a failure
return(false)
else
# it didn't
# check if the file found hasn't been encountered already
if !imported_abs_paths.include?(callback_return) && !file_queue.include?(callback_return)
# it hasn't
# add it to the queue
file_queue.push(callback_return)
end
callback_return.each { |file_path|
# check if the file found hasn't been encountered already
if !imported_abs_paths.include?(file_path) && !file_queue.include?(file_path)
# it hasn't
# add it to the queue
file_queue.push(file_path)
end

# add the file found to the crawled file's array of imported files
@file_crawl_data[crawl_path][:imports].push(callback_return)
# add the file found to the crawled file's array of imported files
@file_crawl_data[crawl_path][:imports].push(file_path)
}
end

# change file_content to have all the text after this match
Expand Down Expand Up @@ -1808,7 +1810,9 @@ def crawlSASS(entry_path, output_path_parts)
def crawlTypeScript(entry_path, output_path_parts)
# build the lambda function that will be applied to each capture group
lambda_func = lambda { |crawl_path, re_match|
return(resolveNodeImportPath(crawl_path, re_match[1], [".tsx", ".ts"]))
path = resolveNodeImportPath(crawl_path, re_match[1], [".tsx", ".ts"])

return(path.class.to_s.eql?("String") ? [path] : path)
}

# check if a path to a tsconfig.json file was provided in the configuration file
Expand Down
4 changes: 2 additions & 2 deletions Classes/Cli.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Bundler and Minimizer for Web files v3.1.0 #
# Bundler and Minimizer for Web files v3.1.1 #
# #
# Copyright 2017, PedroHenriques #
# http://www.pedrojhenriques.com #
Expand Down Expand Up @@ -56,7 +56,7 @@ def initialize(caller_obj)
@caller_obj = caller_obj

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

# receives a string to be printed to the console
Expand Down
2 changes: 1 addition & 1 deletion Includes/autoloader.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Bundler and Minimizer for Web files v3.1.0 #
# Bundler and Minimizer for Web files v3.1.1 #
# #
# Copyright 2017, PedroHenriques #
# http://www.pedrojhenriques.com #
Expand Down
2 changes: 1 addition & 1 deletion main.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Bundler and Minimizer for Web files v3.1.0 #
# Bundler and Minimizer for Web files v3.1.1 #
# #
# Copyright 2017, PedroHenriques #
# http://www.pedrojhenriques.com #
Expand Down
11 changes: 11 additions & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# RELEASE NOTES

## Version 3.1.1

### Changes

- Updated the intro and outro messages
- Renamed the batch file

### Bug Fixes

- Fixed bug that was preventing the program from correctly searching SCSS and SASS entry point files for their imports

## Version 3.1.0

### Changes
Expand Down
File renamed without changes.

0 comments on commit 99ba019

Please sign in to comment.