diff --git a/.gitignore b/.gitignore index 01d752cf..e71e87b6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ app/coffee/modules/locales/locale*.coffee *.swo tags tmp/ -conf/ app/config/main.coffee app/plugins/taiga-front-extras scss-lint.log diff --git a/app/index.jade b/app/index.jade index b067df07..27746d57 100644 --- a/app/index.jade +++ b/app/index.jade @@ -38,3 +38,4 @@ html(lang="en", ng-app="taiga") script(src="/js/libs.js?v=#{v}") script(src="/js/app.js?v=#{v}") + script(src="/js/conf.js?v=#{v}") diff --git a/conf/main.example.json b/conf/conf.example.js similarity index 83% rename from conf/main.example.json rename to conf/conf.example.js index 181dc694..76425ed2 100644 --- a/conf/main.example.json +++ b/conf/conf.example.js @@ -1,4 +1,4 @@ -{ +angular.module('taigaBase').value('localconf', { "api": "http://localhost:8000/api/v1/", "eventsUrl": null, "debug": true, @@ -8,4 +8,4 @@ "termsOfServiceUrl": null, "maxUploadFileSize": null, "gitHubClientId": null -} +}); diff --git a/gulpfile.coffee b/gulpfile.coffee index dd3341a8..a07d7975 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -204,10 +204,9 @@ gulp.task "styles", ["delete-tmp-styles"], -> ############################################################################## gulp.task "conf", -> - gulp.src("conf/main.json") - .pipe(wrap("angular.module('taigaBase').value('localconf', <%= contents %>);")) - .pipe(concat("conf.js")) - .pipe(gulp.dest(paths.tmp)) + gulp.src("conf/conf.example.js") + .pipe(rename("conf.js")) + .pipe(gulp.dest(paths.dist + "js/")) gulp.task "locales", -> gulp.src("app/locales/en/app.json") @@ -226,7 +225,7 @@ gulp.task "jslibs-watch", -> gulp.src(paths.js) .pipe(plumber()) .pipe(concat("libs.js")) - .pipe(gulp.dest("dist/js/")) + .pipe(gulp.dest(paths.dist + "js/")) gulp.task "jslibs-deploy", -> gulp.src(paths.js) @@ -235,7 +234,7 @@ gulp.task "jslibs-deploy", -> .pipe(concat("libs.js")) .pipe(uglify({mangle:false, preserveComments: false})) .pipe(sourcemaps.write('./')) - .pipe(gulp.dest("dist/js/")) + .pipe(gulp.dest(paths.dist + "js/")) gulp.task "app-watch", ["coffee", "conf", "locales"], -> _paths = [