Add js script compiling support in project compile (for iOS, Mac).
Raise error when build failed for iOS/Mac.