split conf file from app.js
parent
d7da4fff8e
commit
4955debc9b
|
@ -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
|
||||
|
|
|
@ -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}")
|
||||
|
|
|
@ -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
|
||||
}
|
||||
});
|
|
@ -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 = [
|
||||
|
|
Loading…
Reference in New Issue