split conf file from app.js

stable
Juanfran 2015-01-15 09:33:11 +01:00
parent d7da4fff8e
commit 4955debc9b
4 changed files with 8 additions and 9 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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}")

View File

@ -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
}
});

View File

@ -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 = [