bistory / sublime-minifier Goto Github PK
View Code? Open in Web Editor NEWSublime Text CSS and JS minifier.
Sublime Text CSS and JS minifier.
First of, thanks a lot and a very good job. I don't have any problems just want to but I guess you could improve the speed I've got 3000 codes and it takes much time. thought it's alright. thanks again
Hi,
The plugin minify all rules in one line! So how to split each minified rule in new line.
css files are getting 404 contacting API. Better to put API links in plist file.
This is happening with js, css, etc.
Exception in thread Thread-6:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File "./compilers/basecall.py", line 23, in run
File "./compilers/reducisauruscall.py", line 19, in exec_request
NameError: global name 're' is not defined
error: There was an error minifying the file.
Warning: finish not called
Traceback (most recent call last):
File "./Minify.py", line 80, in
File "./Minify.py", line 66, in handle_threads
File "./Minify.py", line 140, in handle_result
Boost.Python.ArgumentError: Python argument types in
View.replace(View, Edit, Region, NoneType)
did not match C++ signature:
replace(SP, SP, SelectionRegion, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >)
"Minifier Error: HTTP error 500 contacting API"
Not sure what the problem is, the URL in the PY file is available:
Using the hotkey doesn't do anything and the minify option is unavailable in the menu.
Results in Sublime editor after I press ctr + shift + alt + m is "minifier Error: HTTP 502 error contacting the API"
error: There was an error minifying the file.
Traceback (most recent call last):
File "<sublime>\sublime_plugin.py", line 549, in run_
return self.run(edit)
File "Minify in <sublime>\Data\Installed Packages\Minifier.sublime-package", line 46, in run
File "Minify in <sublime>\Data\Installed Packages\Minifier.sublime-package", line 73, in handle_threads
File "Minify in <sublime>\Data\Installed Packages\Minifier.sublime-package", line 155, in handle_result
This appears if I use Closure. If I switch back to Uglify JS:
error: Minifier Error: HTTP error 400 contacting API
I do have Node installed, and I do have uglifyjs installed. Using ST3.
What could be the problem?
70% of the time when using ctrl + alt + shift + m I get the message:
There was an error minifying the file.
I have to keep doing it until it is successful, I don't change any code just keep pressing ctrl + alt + shift + m until it is successful.
How do I troubleshoot the error?
Here are my settings:
{
"remove_new_lines": false,
"optimization_level": "SIMPLE_OPTIMIZATIONS",
"compiler": "google_closure",
"css_compiler": "cssminifier",
"open_on_min": false,
"timeout": 10,
"minify_options": {
"ask_file_name": false,
"default_name": null,
"suffix": ".min"
}
}
Please consider changing handle_result
to allow using the current file basename as the default name. Like so:
if (options['default_name'] is None or options['default_name'] == "%fileName%"):
file_name_list = current_file.split('/')
real_file_name = file_name_list[-1]
placeholder = path.splitext(path.basename(current_file))[0]
else:
placeholder = options['default_name']
Also, there is a bug when splitting the placeholder, it should be
tmp = placeholder.split(".")
if ( 1 < len(tmp) ):
tmp = tmp[:-1]
I was previously using bistory Minifier in ST2, and it worked fine. In ST3, something is different.
In ST3, Minifier overwrites and saves the existing file in minified form, which means I can't go back and re-edit the original file -- it's gone because it has been minified.
In ST2, I seem to recall that Minifier would save the minified file as a NEW file with .min.js extension (for example). Is this no longer working in ST3? I looked in the user settings for Minifier and I see no options regarding saving the minified file as a new file with a new extension (which ought to be the default, I would think).
Any suggestions?
Pressed CTRL+ALT+M in windows, got the above error on line 1 column 0 (char 0).
However when I press CTRL+ALT+SHIFT+M it works except I get a new file (as expected).
I'm trying to minify JS. I'd really like to minify in the same file.
Hello,
Thank you for an awesome package.
These last few days I've run into different problems, a few days ago I kept getting HTTP error 500 and now today I keep getting "HTTP error 502 contacting API".
I have tried restarting computer, Sublime Text 3 and also changing to a different Internet provider, but the problem is still there :(
I'm guessing there is a server problem somewhere, are there more stable servers out there we can use instead?
Please advise.
When I hit the command to minify my css file, the result is the source code of the css minifier website overwriting the contents of my source code.
It never happened to me when I was still using it 1 to 2 weeks ago.
Some improvements could be made to error handling.
For instance:
See file Minify.py, line 84, method handle_result
.
I'm using this plugins since a few days. This morning I'm trying to save a JS file and get this error
Minifier Error: HTTP error 400 contacting API. I'm connected to the Internet..
Any ideas of what could be causing that? I also tried to remove/re-install the plugin and get the same error.
Thanks.
This:
"default_name" : "czmb.min.js",
Will just output as "czmbmin.js". The dot between the name "czmb" and ".min" isn't working. Any idea why?
can i select some codes to minifiler, such as the inline script codes in the html file.
Looks like the plugin in broken on the Build 3126 of Sublime Text 3... after update I keep getting generic "There was an error while minifiying file"
Discovered on Linux
I am currently working on some projects that have .src.js files and .min.js files. I would like to be able to use autosave but have and option to remove .src from the filename so I don't end up with .src.min.js.
Did this mean i can only use non-ascii characters in my css files?
I just installed this package and minified a JS file. Instead I got this (which replaces the whole file):
<!doctype html>
<meta charset=utf8>
<title>Service discontinued</title>
<body style="font-family: georgia; font-size: 1.1em; max-width: 45em">
<h1>Service discontinued</h1>
<p>Keeping the uglify service running while somehow protecting my lightweight VM from (often unintentional) denial-of-service attacks by people sending lots of requests or really huge sources was too much of a burden. I've shut it down. You can install <a href="https://www.npmjs.com/package/uglify-js">uglify-js</a> locally with <code>npm install -g uglify-js</code> instead.</p>
</body>
Looks like the service used to minify the file is no longer in service.
Because it conflict with Minimize all sublime text window :(
Firstly, hello and thanks for making this plugin.
This article explains how to use Uglify's 'Dead code' remover to remove all the console.logs
Can you guide me on how to use this with your SublimeText package?
When trying to minify a CSS file containing syntax unrecognized by Reducisaurus, Sublime-Minifier logs "HTTP error 500 contacting the API". This seems to be the intended behaviour of the Reducisaurus API (returning error 500 on syntax error).
Synxtax error involves @chartset
and /* comments */
but I cannot reproduce this behaviour consistently.
Anyway, catching these errors and explaining them in the Sublime Text console would be nicer.
the following example generates problematic minified code:
@media screen and (orientation: landscape) {
body { color: red; }
}
the space after "and" should not be stripped out, as chrome does not interpret that correctly. seems to work on other browsers.
Replace calls to online API by local alternatives in order to make the plugin work offline (cool when working out of office).
ctrl + alt + m notwork
Minifier Error: HTTP error 400 contacting API
Any solution?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.