npm install html2js> simple html2js processer, i use it solve requirejs text crossdomain
html2js(source[, options])
Options:
* mode: A string naming js code style. Optional. Possible values:
* undefined (default): keep space and carriage of source html
* compress: strip the extra spaces or carriage at the beginnings and ends of the lines
* format: format js code as spec
* wrap: A string naming js code wrapper. Optional. Possible values:
* undefined (default): no wrapper
* amd: wrap with AMD
* commonjs: wrap with CommonJS
* ignoreScriptTag: boolean to ignore fix split the script tag when writing it with document write. Defaults to false
```
npm run example
test.html:
`html`
i am test
test.html.js:
`
/**
* html2js(source, {
* mode: 'default'
* wrap: 'amd'
* })
*/
define(function () {return '\n \n\n i am test\n \n