Last active
December 9, 2015 21:25
-
-
Save DavidFrahm/3f3c76c964d0252df62d to your computer and use it in GitHub Desktop.
Setup karma-ng-html2js-preprocessor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install --save-dev karma-ng-html2js-preprocessor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Working example from Ionic app | |
module.exports = function (config) { | |
config.set({ | |
basePath: './www', | |
files: [ | |
// ...existing src... | |
'**/*.html', | |
// ...existing tests... | |
], | |
plugins: [ | |
'karma-jasmine', | |
'karma-phantomjs-launcher', | |
'karma-ng-html2js-preprocessor' | |
], | |
preprocessors: { | |
'**/*.html': ['ng-html2js'] | |
}, | |
ngHtml2JsPreprocessor: { | |
moduleName: 'ngViews', | |
stripPrefix: 'www/' | |
}, | |
reporters: ['progress'] | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment