Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS minification doesn't work #27

Open
samuel-clara opened this issue Dec 21, 2017 · 15 comments
Open

JS minification doesn't work #27

samuel-clara opened this issue Dec 21, 2017 · 15 comments

Comments

@samuel-clara
Copy link

Since last update for me js minification doesn't work at all.

@abagshaw
Copy link
Owner

abagshaw commented Dec 21, 2017

  1. What OS are you on?
  2. If you have made any changes to the minifier preferences, can you copy and paste the contents of the .brackets.json file in your project's root here?
  3. Can you copy and paste any errors that appear in the Developer Tools Console (Help -> Show Developer Tools -> Console)?

@greenpharey
Copy link

greenpharey commented Dec 21, 2017

I'm having the same issue with the js minification not working.

  • OS: Windows 10 Pro

  • My brackets.json file:
    { "brackets-eslint.gutterMarks": true, "brackets-eslint.useLocalESLint": false, "fonts.fontSize": "14px", "fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace", "extensions.sort": "downloadCount", "brackets-minifier.on-save": true, "themes.theme": "monokai-strikes-back", "custom.work.useIconsOfCustomWork": true, "custom.work.blueish": true, "custom.work.moveToolbarToSidebar": true, "custom.work.autoHideTheTabmenu": true, "linting.collapsed": true }

  • I don't see any errors in the Developer Tooks Console.

@abagshaw
Copy link
Owner

@greenpharey Can you paste the contents the .brackets.json file that is in the root of your project (if you made any changes to the minifier preferences). What you pasted above is from the main .brackets.json for global settings across the whole Brackets application.

When you say js minification is "not working" can you be more specific? Does any message show up in the lower right, is the minified file created at all?

@greenpharey
Copy link

@abagshaw - Sorry about that. I didn't make any changes to the minifier preferences.

For me, when I right-click and choose 'Minify" or click Ctrl+Alt+M, the only thing that happens in the lower right corner is an extra box appears that says "Minified" that's written in black text so I can barely see it. Other than that nothing else happens on the screen. I also never see the js min file appear in my file respository.

@abagshaw
Copy link
Owner

@greenpharey Could you do a search on your computer for filename.min.js where filename is the original filename of the unminified JS file? There's a possibility that the path isn't being set properly and the minified file is being saved somewhere weird.

Also, this is a separate issue, but are you using some kind of dark theme for brackets - brackets-minifier wasn't designed to adapt the status message to different backgrounds (it assumed the text was placed on the light background) - but if there's a way to detect a dark background then I can see if that can be fixed.

@greenpharey
Copy link

greenpharey commented Dec 21, 2017

Hi @abagshaw - I did the search via your instructions and it says the file was in the correct path even though it was not appearing on the screen. I refreshed the file tree a couple of times and then it appeared. I minified another file and it did not appear at first until i refreshed the file tree a couple of times. Maybe there is some sort of lag.

With respect to the dark status message, yes I do use a dark background. ""themes.theme": "monokai-strikes-back"," from my global backets.json is the theme I use. It looks like when there's a ".dark" class on the body tag then the following style is added from the brackets.min.css file:
html .dark, body .dark, html.dark, body.dark { color: #ccc; }

Perhaps, when that .dark class exists on the body tag, you could apply the same color to your status message? Or remove the color that's overwriting it in general so that it accepts what is default?

@abagshaw
Copy link
Owner

abagshaw commented Dec 22, 2017

@greenpharey I've actually noticed the same problem on my machine (also Win 10) - with brackets not updating the file tree. If you look in the folder (with File Explorer) you can see that the minified file shows up immediately upon minification, brackets just doesn't seem to want to display it sometimes. I'm not really sure if this is something wrong with the plugin - my guess is that it's an issue with brackets.

In regards to the dark mode issue - looks like that should be a fairly straightforward fix. I'll try to get around to that when I have some time.

@samuel-clara
Copy link
Author

  1. OS high sierra
  2. no changes in the minifier preferences
  3. no errors are shown in the Developer Tool Console

@abagshaw
Copy link
Owner

@samuel91 Does anything show up in the lower right hand corner of the Brackets window when you try to minify the file? Also, can you navigate to the location of where the minified file should be to see if this is a problem similar to the one @greenpharey was talking about?

@samuel-clara
Copy link
Author

@abagshaw I don't know why but today without any upgrades it is working correctly again but the shortcut for minification doesn't work!??

@abagshaw
Copy link
Owner

abagshaw commented Dec 24, 2017

@samuel91 That's odd, are you saying that if you manually trigger minification with Edit -> Minify it does work, but using the shortcut Cmd+Alt+M doesn't do anything?

Can you check the dev console again for any errors?

@samuel-clara
Copy link
Author

Exactly! I checked again but no errors are shown in the dev console.

@abagshaw
Copy link
Owner

@samuel91 Have you installed/updated any other Brackets extensions recently that may also be trying to use the Cmd+Alt+M shortcut?

@samuel-clara
Copy link
Author

I don't think so, i simple updated the ones I had before. How can I check this?

@SethClydesdale
Copy link

SethClydesdale commented Mar 3, 2018

Hi,

I have the same issue with this plugin. Whenever I try to minify my JS via CTRL+ALT+M or Context>Minify I get the following error.

"timeout" @ main.js:237

I got this error earlier, so I reinstalled the plugin and it worked. However, after starting brackets up again I'm facing the same issue.

I'm on Win10 btw, if that helps.

EDIT: After reinstalling a second time it appears to be working. I believe the first reinstall didn't work properly because my power went out at the time and screwed something up. (probably reverted the changes?) Regardless, the error I mentioned above happened AFTER updating the plugin while I had a prior version installed. Reinstalling seems to fix it, so it may or may not be worth looking into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants