GithubHelp home page GithubHelp logo

sublime-minifier's Introduction

Hi there ๐Ÿ‘‹

sublime-minifier's People

Contributors

bistory avatar guilhermecoltro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sublime-minifier's Issues

speed

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

css minifier problem

css files are getting 404 contacting API. Better to put API links in plist file.

Error minifiying 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> >)

HTTP Error 502 minifier

Results in Sublime editor after I press ctr + shift + alt + m is "minifier Error: HTTP 502 error contacting the API"

AttributeError: 'NoneType' object has no attribute 'decode'

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?

There was an error minifying the file.

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"
  }
}

Allow using the file basename to be used as default filename.

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]

Overwrites existing file; doesn't save with new .min extension

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?

No JSON object could be decoded

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.

Minifier Error: HTTP error 502 contacting API

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.

Invalid output

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.

Enhancement: improve error handling

Some improvements could be made to error handling.

For instance:

  • Logging errors in the Sublime Text console instead of replacing the initial content of the file by the error code
  • Identify errors based on the type of the file (CSS or JS)

See file Minify.py, line 84, method handle_result.

Minifier Error: HTTP error 400 contacting API

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.

Broken on ST3 Build 3126

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

Ability to check for .src in file name

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.

Service discontinued

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.

Uglify and Console.log removal

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?

Minifier Error : HTTP error 500 contacting the API

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.

css media types (@media) error

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.