Is cocos2dx cpp project portable to JS?

I wanna be able to reuse my game writter in cpp for cocos-js. Is this too crazy?