karma-ng-stripscript-preprocessor

0.0.3 • Public • Published

karma-ng-stripScript-preprocessor

Preprocessor to strip script tag from HTML files to AngularJS templates.

Build Status

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i karma-ng-stripscript-preprocessor

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • lsdev14