diff --git a/app/config.json b/app/config.json index 2c9ca19a8e99dd1e0da051e2e5b4ec8ff01ef171..4f17e860b411c824e29d115f17b947f863b801f6 100644 --- a/app/config.json +++ b/app/config.json @@ -11,7 +11,7 @@ "market": { "APP_CONFIG": { "DUNITER_NODE": "cgeek.fr:9330", - "DUNITER_NODE_ES": "test-net.duniter.fr:9202", + "DUNITER_NODE_ES": "test-net.duniter.fr:9203", "NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug", "TIMEOUT": 4000, "DEBUG": false diff --git a/gulpfile.js b/gulpfile.js index 2f99a46a84d7e46395e2dcec3dfa31e3c3583c71..027f507e5dea1fd385eeb802909aad7c9d5592c8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -310,38 +310,41 @@ gulp.task('ng_annotate-plugin:web', ['templatecache-plugin:web'], function (done gulp.task('optimize-files:web', ['ng_annotate:web', 'ng_annotate-plugin:web'], function(done) { var tmpPath = './platforms/web/www'; - var jsFilter = filter(["**/*.js", "!**/vendor/*"], { restore: true }); + var jsFilter = filter(["**/*.js", "!**/vendor/*", '!**/config.js'], { restore: true }); var cssFilter = filter("**/*.css", { restore: true }); - var indexHtmlFilter = filter(['**/*', '!**/index.html'], { restore: true }); + var revFilesFilter = filter(['**/*', '!**/index.html', '!**/config.js'], { restore: true }); gulp.src(tmpPath + '/index.html') - .pipe(useref()) // Concatenate with gulp-useref + .pipe(useref()) // Concatenate with gulp-useref + // Process JS .pipe(jsFilter) .pipe(uglify()) // Minify any javascript sources .pipe(jsFilter.restore) + + // Process CSS .pipe(cssFilter) .pipe(csso()) // Minify any CSS sources .pipe(cssFilter.restore) - .pipe(indexHtmlFilter) - .pipe(rev()) // Rename the concatenated files (but not index.html) - .pipe(indexHtmlFilter.restore) - .pipe(revReplace()) // Substitute in new filenames + + // Add revision to filename (but not index.html and config.js) + .pipe(revFilesFilter) + .pipe(rev()) // Rename the concatenated files + .pipe(revFilesFilter.restore) + + // Substitute in new filenames + .pipe(revReplace()) .pipe(gulp.dest(tmpPath)) .on('end', done); }); gulp.task('clean-unused-files:web', ['optimize-files:web'], function(done) { var tmpPath = './platforms/web/www'; - var jsFilter = filter(["**/*.js", "!**/cesium-*.js"]); - var cssFilter = filter(["**/*.css", "!**/cesium-*.css"]); es.concat( gulp.src(tmpPath + '/js/**/*.js', {read: false}) - .pipe(jsFilter) .pipe(clean()), gulp.src(tmpPath + '/css/**/*.css', {read: false}) - .pipe(cssFilter) .pipe(clean()) ) .on ('end', done); @@ -356,7 +359,8 @@ gulp.task('clean-unused-directories:web', ['clean-unused-files:web'], function(d tmpPath + '/dist', tmpPath + '/lib/ionic/scss', tmpPath + '/lib/ionic/css', - tmpPath + '/lib/ionic/js' + tmpPath + '/lib/ionic/js', + tmpPath + '/lib/ionic/version.json' ]); }); diff --git a/www/index.html b/www/index.html index fc3bb9281c6043bf0b9ad5b16fbc1dbd6197a06b..752c2b4eb45a0e9deeee92144adf75e95ecb2e32 100644 --- a/www/index.html +++ b/www/index.html @@ -4,12 +4,10 @@ <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title>Cesium</title> - - <link rel="icon" href="./img/favicon.ico"> - <link rel="manifest" href="/manifest.json"> - + <link rel="icon" href="./img/favicon.ico"> + <link rel="manifest" href="/manifest.json"> <!-- build:css dist_css/cesium.css --> - <link href="css/ionic.app.css" rel="stylesheet"> + <link href="css/ionic.app.min.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <!--removeIf(device)--> @@ -20,8 +18,7 @@ <link href="dist/dist_css/plugins/es/css/style.css" rel="stylesheet"> <!--endRemoveIf(device)--> <!-- endbuild --> - - <!-- build:js dist_js/cesium.js --> + <!-- build:js dist_js/vendor.js --> <!-- vendor js --> <script src="js/vendor/moment.min.js"></script> <script src="js/vendor/moment.fr.js"></script> @@ -51,10 +48,8 @@ <script src="js/vendor/ng-cordova.min.js"></script> <script src="cordova.js"></script> <!--endRemoveIf(no-device)--> - - <!-- config --> - <script src="js/config.js"></script> - + <!-- endbuild --> + <!-- build:js dist_js/cesium.js --> <!-- services --> <script src="dist/dist_js/app/services/crypto-services.js"></script> <script src="dist/dist_js/app/services/utils-services.js"></script> @@ -116,9 +111,12 @@ <script src="dist/dist_js/app/directives.js"></script> <script src="dist/dist_js/app/app.js"></script> <!-- endbuild --> - + <!-- build:js config.js --> + <!-- config --> + <script src="js/config.js"></script> + <!-- endbuild --> </head> <body ng-app="cesium" ng-strict-di> - <ion-nav-view></ion-nav-view> + <ion-nav-view></ion-nav-view> </body> </html> diff --git a/www/js/config.js b/www/js/config.js index 831b520132fbccfa993f826bfd6a28af3fc67434..b5fafe19cbe0f86cd116b34ce49447b9343e3d61 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -10,12 +10,11 @@ angular.module("cesium.config", []) .constant("APP_CONFIG", { "DUNITER_NODE": "cgeek.fr:9330", - "DUNITER_NODE_ES": "test-net.duniter.fr:9202", "NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug", "TIMEOUT": 4000, "DEBUG": false, "VERSION": "0.1.27", - "BUILD_DATE": "2016-08-18T12:55:59.884Z" + "BUILD_DATE": "2016-08-18T14:27:04.933Z" }) ; \ No newline at end of file