karma-ng-stripscript-preprocessor
v0.0.3
Published
A Karma plugin. Strip script tag from HTML files to AngularJS templates.
Downloads
19
Maintainers
Readme
karma-ng-stripScript-preprocessor
Preprocessor to strip script tag from HTML files to AngularJS templates.
Installation
Installation is simple using the following:
npm install karma-ng-stripscript-preprocessor --save-dev
Configuration
// karma.conf.js
module.exports = function(config) {
config.set({
files: [
'content/shared/views/**/*.jade'
],
preprocessors: {
'content/shared/views/**/*.jade': 'ng-stripScript'
}
});
};
Example
Before
<script id="test" type="text/ng-template"><div id="test" data-ng-show="content"></div></script>
After
<div id="test" data-ng-show="content"></div>
You can use other preprocessors together with ng-stripScript
npm install karma-ng-i18n-preprocessor --save-dev
npm install karma-ng-jade2js-preprocessor --save-dev
// karma.conf.js
preprocessors: {
'content/shared/views/**/*.jade': ['ng-i18n','ng-jade2js','ng-stripScript']
}
For more information on Karma see the homepage.