1

I'm trying to move to WebStorm (which I'm currently evaluating as a ST3 replacement) the following gulp workflow:

  • upon each file save
  • transpile with babel
  • inline sourcemaps
  • rename file from file.es6.js to file.js
  • move it from src/ tree to dist/ directory tree.

I've tried messing with it, for example:

--source-maps inline --stage 1 --out-dir dist/

gets me some results, but not renamed, and with $FileNameWithoutExtension$ I don't even know how to look into, extract that es6. part and remove it.

Leonid Beschastny
  • 50,364
  • 10
  • 118
  • 122
Zlatko
  • 18,936
  • 14
  • 70
  • 123

1 Answers1

2

To have dist/file.js generated for each of your src/file.es6.js, try the following file watcher settings:

Arguments: --source-maps inline --out-file $ProjectFileDir$/dist/$FileDirRelativeToProjectRoot$/$FileNameWithoutAllExtensions$.js $FilePath$
Working directory: $FileDir$
Output paths to refresh: $ProjectFileDir$/dist/$FileDirRelativeToProjectRoot$/$FileNameWithoutAllExtensions$.js

I'm, however, not sure why you need replacing Gulp with file watchers - why not proceeding with Gulp? It works perfectly well with WebStorm

lena
  • 90,154
  • 11
  • 145
  • 150
  • Well, I still prefer Sublime Text 3 + gulp, but I wanted to switch to WebStorm because of the Node.js debugger - and then I was looking into having it do more, since it's so heavy-weight already. But maybe you're right, I should just stay with gulp. Off to try this thing now, though. – Zlatko Aug 28 '15 at 13:56