Execute jsmin from nppexec

NppExec
Martin
2013-01-14
2013-05-21
  • Martin

    Martin - 2013-01-14

    Not sure if this is a nppexec question or a jsmin question…

    Is it possible to invoke jsmin from nppexec command line?

    Now I've got shrinksafe working and saving to another file, I'd like to minimise it too.

    Thanks

     
  • Martin

    Martin - 2013-01-14

    To clarify, I am looking to use the jsmin plugin rather than an external batch file, if possible.

     
  • DV

    DV - 2013-01-14

    The example for jsmin (http://www.crockford.com/javascript/jsmin.html) shows the following example: 
    jsmin <fulljslint.js >jslint.js 
    Did you try something similar? E.g. 
    cmd /c jsmin <"$(FILE_NAME)" >"$(NAME_PART).jsmin.$(EXT_PART)" 
     
    Is it what you want? (If so, it's tooo simple question - but otherwise I just don't understand what you want to achieve…)

     
  • Martin

    Martin - 2013-01-14

    Thanks dv__

    that's the way I ended up doing it, but I was trying not to have to run a command, if possible.

    I've got the jsmin plugin and assigned a shortcut to it.  Is there any way in nppexec to run a shortcut?

     
  • DV

    DV - 2013-01-15

    Currently I am not sure if it is possible. I was trying to use NPPM_MENUCOMMAND - such as "npp_sendmsg NPPM_MENUCOMMAND 0 IDM_EXECUTE" - but it worked with static (standard) menu items only, whereas custom (user's) and plugin's menu items seem to have generic (dynamic) menu items IDs. You can try to dig in this direction - though in case if you are not familiar with such things as "menu items id" and "SendMessage", I wouldn't recommend to dig since "Warning: incorrect usage of this command (npp_sendmsg) may crash Notepad++ !!!" :)

     
  • DV

    DV - 2013-01-15

    (While I mentioned NPPM_MENUCOMMAND, I assumed there was a small chance that the menu items under "Run… F5" item would have increasing item IDs - thus making possible to call them via "npp_sendmsg NPPM_MENUCOMMAND 0 IDM_EXECUTE+1" and so on. But this doesn't seem to be the case - the menu item id of (IDM_EXECUTE+2) does not correspond to "Launch in Firefox" or "Launch in IE" menu item.)

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks