pre-deployment in WebStorm

Let's say that
a) I am new to programming and
b) I have phobia of command line tools and
c) I love WebStorm.

WebStorm allows me to very efficiently write code in a cool IDE automating plenty of stuff. The last piece I am missing is pre-deployment, that is:

1/ concatenating all JS modules (I use RequireJS) and libraries into one file.
2/ concatenating all CSS files into one file.
3/ minifying.
4/ anything else?

I am digging into the documentation but I don't see anything related to concatenating modules and libraries.

Any advice is totally welcome.

PS: I am not really that scared of command line tools, I have managed to install the TypeScript compiler and link it with the FileWatcher.

0
7 comments

Hi there,

The deployment functionality of the IDE has no option to execute any task automatically before deployment.

You can use File Watcher functionality to automatically perform certain actions (execute external command) on modified files -- http://confluence.jetbrains.com/display/PhpStorm/File+Watchers+in+PhpStorm

Upcoming v8 (RC at the moment) supports Grunt tasks -- use them before deploying.

http://blog.jetbrains.com/webstorm/2014/03/webstorm-8-rc/

0
Avatar
Permanently deleted user

Thanks, the Grunt integration in WS8 looks like exactly the stuff I am looking for.

Just out of curiosity, can the FileWatchers concatenate JS modules and libraries?

PS: I am not really that scared of command line tools, I have managed to install the TypeScript compiler and link it with the FileWatcher.

0

File Watcher itself does not concatenate/minifies/compiles anything -- it's just a tool that will launch any external command (*on file save*) that can actually do that. So you can write some shell/batch script (that will execute *anything* you want) or use any existing tool that can do that (e.g. Grunt task) and use it in the "program" field of the file watcher entry.

For example, you can create custom grunt task and use it in file watcher to be executed t on every file save (so no need to remember doing that before uploadiing). Obviously, there is no real need to execute heavy (time consuming) tasks in such fashion (as task will be executed for every modified file), but light ones may work just fine.

0
Avatar
Permanently deleted user

I understand.

One more question, it obviously does not make to concatenate/minify on save but is there a way to call such grunt script from WebStorm IDE (with a press of a button) ithout opening a command line tool manually)?

Thanks

0

Would you agree that screenshot from 2nd link (about WebStorm v8 RC) suggests that it should be possible to do that?

http://blog.jetbrains.com/webstorm/files/2014/03/grunt-blog-noshadow.png


I may only suggest to install it (v8 RC) and try it yourself because I'm unable to give you more definite answer since I do not use Grunt myself.

0
Avatar
Permanently deleted user

Thanks!

0

v8 has been released -- http://blog.jetbrains.com/webstorm/2014/03/welcome-webstorm-8/

Yiu can check short video about all new features, which includes Grunt support. It's short but should give you enough to have understanding on how it works (once grunt console is opened you can tun any task by clicking on it).

0

Please sign in to leave a comment.