Add model.js script generation

@raymondfeng @bajtos please review
It would be better to modify the template to pass the linter, instead of turning off a useful check.