Commit 0283577a3a91f419b3a386991414a0610851ea02

Authored by ABNER SILVA DE OLIVEIRA
1 parent 78b1f609

adjustments on index.html after fixes on coverage

dev-scripts/remapCoverage.ts
... ... @@ -68,14 +68,14 @@ fs.readdir(coveragePath, (err, directories) => {
68 68 // sillent: true
69 69 // });
70 70  
71   - var loadCoverage = require('remap-istanbul/lib/loadCoverage');
72   - var remap = require('remap-istanbul/lib/remap');
73   - var writeReport = require('remap-istanbul/lib/writeReport');
  71 + let loadCoverage = require('remap-istanbul/lib/loadCoverage');
  72 + let remap = require('remap-istanbul/lib/remap');
  73 + let writeReport = require('remap-istanbul/lib/writeReport');
74 74  
75   - var collector = remap(loadCoverage(coverageFile), {
76   - exclude: 'Reflect',
77   - /*readFile: function(filePath): any {
78   - var pathNormalized = filePath.replace("webpack:///./src/", "");
  75 + let collector = remap(loadCoverage(coverageFile), {
  76 + /*exclude: 'Reflect',
  77 + readFile: function(filePath): any {
  78 + let pathNormalized = filePath.replace("webpack:///./src/", "");
79 79 pathNormalized = pathNormalized.replace(/\.ts\?(\w+)"/, ".ts\"");
80 80 console.log("FILE PATH: ", pathNormalized);
81 81 if (!fs.existsSync(pathNormalized)) {
... ... @@ -85,21 +85,18 @@ fs.readdir(coveragePath, (err, directories) => {
85 85 return fs.readFileSync(pathNormalized);
86 86 }*/
87 87 });
88   -
89   - var Store = require("istanbul").Store;
90   - var store = Store.create("fslookup");
91   - store.get = function (key) {
92   - var pathNormalized = key.replace("src/webpack:/", "");
93   - console.error("PATH >>> ", pathNormalized);
  88 +
  89 + let Store = require("istanbul").Store;
  90 + let store = Store.create("fslookup");
  91 + store.get = function(key) {
  92 + let pathNormalized = key.replace("src/webpack:/", "");
  93 + console.error("PATH >>> ", pathNormalized);
94 94 pathNormalized = pathNormalized.replace(/\.ts\?(\w+)/, ".ts");
95 95 console.log("my store got called!", key, pathNormalized);
96 96 return fs.readFileSync(pathNormalized, 'utf8');
97 97 }
98 98 writeReport(collector, 'html', coverageFolder, store);
99   - writeReport(collector, 'json', path.join(coverageFolder, 'coverage-final-remaped.json'), store).then(function() {
100   -
101   - /* do something else now */
102   - });
  99 + writeReport(collector, 'json', path.join(coverageFolder, 'coverage-final-remaped.json'), store);
103 100 });
104 101  
105 102 });
106 103 \ No newline at end of file
... ...
src/app/components/navbar/navbar.ts
... ... @@ -28,7 +28,7 @@ export class Navbar {
28 28  
29 29 this.currentUser = session.currentUser();
30 30  
31   - $scope.$on(AUTH_EVENTS.loginSuccess, function() {
  31 + $scope.$on(AUTH_EVENTS.loginSuccess, () => {
32 32 if (this.modalInstance) {
33 33 this.modalInstance.close();
34 34 this.modalInstance = null;
... ...
src/index.html
... ... @@ -33,9 +33,9 @@
33 33 <!-- endbower -->
34 34 <!-- endbuild -->
35 35  
36   -
37   -
38 36 <script src="commons.js"></script>
  37 + <script src="vendor.bundle.js"></script>
  38 +
39 39 <script src="noosfero.js"></script>
40 40 <!-- inject:partials -->
41 41 <!-- angular templates will be automatically converted in js and inserted here -->
... ...