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 *.swo
tags tags
tmp/ tmp/
conf/
app/config/main.coffee app/config/main.coffee
app/plugins/taiga-front-extras app/plugins/taiga-front-extras
scss-lint.log 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/libs.js?v=#{v}")
script(src="/js/app.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/", "api": "http://localhost:8000/api/v1/",
"eventsUrl": null, "eventsUrl": null,
"debug": true, "debug": true,
@ -8,4 +8,4 @@
"termsOfServiceUrl": null, "termsOfServiceUrl": null,
"maxUploadFileSize": null, "maxUploadFileSize": null,
"gitHubClientId": null "gitHubClientId": null
} });

View File

@ -204,10 +204,9 @@ gulp.task "styles", ["delete-tmp-styles"], ->
############################################################################## ##############################################################################
gulp.task "conf", -> gulp.task "conf", ->
gulp.src("conf/main.json") gulp.src("conf/conf.example.js")
.pipe(wrap("angular.module('taigaBase').value('localconf', <%= contents %>);")) .pipe(rename("conf.js"))
.pipe(concat("conf.js")) .pipe(gulp.dest(paths.dist + "js/"))
.pipe(gulp.dest(paths.tmp))
gulp.task "locales", -> gulp.task "locales", ->
gulp.src("app/locales/en/app.json") gulp.src("app/locales/en/app.json")
@ -226,7 +225,7 @@ gulp.task "jslibs-watch", ->
gulp.src(paths.js) gulp.src(paths.js)
.pipe(plumber()) .pipe(plumber())
.pipe(concat("libs.js")) .pipe(concat("libs.js"))
.pipe(gulp.dest("dist/js/")) .pipe(gulp.dest(paths.dist + "js/"))
gulp.task "jslibs-deploy", -> gulp.task "jslibs-deploy", ->
gulp.src(paths.js) gulp.src(paths.js)
@ -235,7 +234,7 @@ gulp.task "jslibs-deploy", ->
.pipe(concat("libs.js")) .pipe(concat("libs.js"))
.pipe(uglify({mangle:false, preserveComments: false})) .pipe(uglify({mangle:false, preserveComments: false}))
.pipe(sourcemaps.write('./')) .pipe(sourcemaps.write('./'))
.pipe(gulp.dest("dist/js/")) .pipe(gulp.dest(paths.dist + "js/"))
gulp.task "app-watch", ["coffee", "conf", "locales"], -> gulp.task "app-watch", ["coffee", "conf", "locales"], ->
_paths = [ _paths = [