First js layout.
parent
489c14b218
commit
ea9b480e46
|
@ -1,4 +1,4 @@
|
|||
.sass-cache/
|
||||
bower_components/
|
||||
dist/
|
||||
node_modules/
|
||||
app/vendor
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
|
||||
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
|
||||
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@taiga = taiga = {}
|
||||
|
||||
configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $compileProvider, $gmUrlsProvider) ->
|
||||
$routeProvider.when('/project/:pslug/backlog', {templateUrl: '/partials/backlog.html'})
|
||||
$routeProvider.otherwise({redirectTo: '/login'})
|
||||
$locationProvider.html5Mode(true);
|
||||
|
||||
defaultHeaders = {
|
||||
"Content-Type": "application/json"
|
||||
"Accept-Language": "en"
|
||||
}
|
||||
|
||||
$httpProvider.defaults.headers.delete = defaultHeaders
|
||||
$httpProvider.defaults.headers.patch = defaultHeaders
|
||||
$httpProvider.defaults.headers.post = defaultHeaders
|
||||
$httpProvider.defaults.headers.put = defaultHeaders
|
||||
$httpProvider.defaults.headers.get = {}
|
||||
|
||||
# authHttpIntercept = ($q, $location) ->
|
||||
# return (promise) ->
|
||||
# return promise.then null, (response) ->
|
||||
# if response.status == 401 or response.status == 0
|
||||
# $location.url("/login?next=#{$location.path()}")
|
||||
# return $q.reject(response)
|
||||
# $provide.factory("authHttpIntercept", ["$q", "$location", authHttpIntercept])
|
||||
# $httpProvider.responseInterceptors.push('authHttpIntercept')
|
||||
|
||||
|
||||
init = ($rootScope) ->
|
||||
console.log "INIT"
|
||||
|
||||
|
||||
configure.$inject = ["$routeProvider", "$locationProvider","$httpProvider"]
|
||||
init.$inject = ["$rootScope"]
|
||||
|
||||
modules = [
|
||||
"ngRoute",
|
||||
"ngAnimate",
|
||||
|
||||
# Taiga specific modules
|
||||
# "taigaCommon"
|
||||
]
|
||||
|
||||
|
||||
angular.module("taigaLocalConfig", []).value("localconfig", {})
|
||||
module = angular.module("taiga", modules)
|
||||
module.config(configure)
|
||||
module.run(init)
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
doctype html
|
||||
html(lang="en", ng-app="taiga")
|
||||
head
|
||||
meta(charset="utf-8")
|
||||
title= Taiga
|
||||
meta(http-equiv="content-type", content="text/html; charset=utf-8")
|
||||
meta(name="description", content="Taiga Landing page")
|
||||
meta(name="keywords", content="Agile, Taiga, Management, Github")
|
||||
meta(name="viewport", content="width=device-width, user-scalable=no")
|
||||
link(rel="stylesheet", href="/styles/main.css")
|
||||
body
|
||||
include partials/views/modules/nav
|
||||
div.wrapper(ng-view="")
|
||||
script(src="/js/libs.js?v=#{v}")
|
||||
script(src="/js/app.js?v=#{v}")
|
|
@ -1,4 +1,4 @@
|
|||
extends layout
|
||||
extends dummy-layout
|
||||
|
||||
block head
|
||||
title Taiga Project management web application with scrum in mind!
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
block content
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "taiga-layout",
|
||||
"version": "0.1.0",
|
||||
"homepage": "https://github.com/taiga.io/taiga-layout",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andrey Antukh",
|
||||
"email": "niwi@niwi.be"
|
||||
},
|
||||
{
|
||||
"name": "Jesus Espino Garcia",
|
||||
"email": "jespinog@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "David Barragán Merino",
|
||||
"email": "dbarragan@dbarragan.com"
|
||||
},
|
||||
{
|
||||
"name": "Xavi Julian",
|
||||
"email": "xavier.julian@kaleidos.net"
|
||||
}
|
||||
],
|
||||
"description": "Taiga project management system (frontend)",
|
||||
"license": "AGPL-3.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:taigaio/taiga-front.git"
|
||||
},
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"app/vendor",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"lodash": "~2.4.1",
|
||||
"emoticons": "~0.1.7",
|
||||
"jquery-flot": "~0.8.2",
|
||||
"angular": "1.2.17",
|
||||
"angular-route": "1.2.17",
|
||||
"angular-animate": "1.2.17",
|
||||
"angular-sanitize": "1.2.17",
|
||||
"angular-mocks": "1.2.17",
|
||||
"kalendae": "~0.4.1",
|
||||
"checksley": "~0.5.0",
|
||||
"i18next": "~1.7.1",
|
||||
"jquery": "~2.1.1",
|
||||
"select2": "~3.4.5",
|
||||
"angular-ui-select2": "~0.0.5",
|
||||
"google-diff-match-patch-js": "~1.0.0",
|
||||
"underscore.string": "~2.3.3",
|
||||
"markitup": "~1.1.14",
|
||||
"jquery-textcomplete": "yuku-t/jquery-textcomplete#~0.1.1",
|
||||
"flot-orderBars": "emmerich/flot-orderBars",
|
||||
"moment": "~2.6.0",
|
||||
"isMobile": "~0.3.1",
|
||||
"favico.js": "0.3.4",
|
||||
"Sortable": "~0.1.8"
|
||||
},
|
||||
"resolutions": {
|
||||
"lodash": "~2.4.1",
|
||||
"moment": "~2.6.0",
|
||||
"jquery": "~2.1.1"
|
||||
},
|
||||
"private": true
|
||||
}
|
49
gulpfile.js
49
gulpfile.js
|
@ -31,9 +31,22 @@ var paths = {
|
|||
distStyles: "dist/styles",
|
||||
sassMain: "app/styles/main.scss",
|
||||
css: "dist/styles/**/*.css",
|
||||
images: "app/images/**/*"
|
||||
images: "app/images/**/*",
|
||||
coffee: ["app/coffee/*.coffee", "app/coffee/**/*.coffee"]
|
||||
};
|
||||
|
||||
// Ordered list of vendor/external libraries.
|
||||
var vendorJsLibs = [
|
||||
"app/vendor/jquery/dist/jquery.js",
|
||||
"app/vendor/lodash/dist/lodash.js",
|
||||
"app/vendor/emoticons/lib/emoticons.js",
|
||||
"app/vendor/underscore.string/lib/underscore.string.js",
|
||||
"app/vendor/angular/angular.js",
|
||||
"app/vendor/angular-route/angular-route.js",
|
||||
"app/vendor/angular-sanitize/angular-sanitize.js",
|
||||
"app/vendor/angular-animate/angular-animate.js"
|
||||
]
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Layout/CSS Related tasks
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -45,6 +58,13 @@ gulp.task("jade", function() {
|
|||
.pipe(gulp.dest(paths.dist + "/partials"));
|
||||
});
|
||||
|
||||
gulp.task("template", function() {
|
||||
return gulp.src(paths.app + "/index.jade")
|
||||
.pipe(plumber())
|
||||
.pipe(jade({pretty: true, locals:{v:(new Date()).getTime()}}))
|
||||
.pipe(gulp.dest(paths.dist));
|
||||
});
|
||||
|
||||
// Sass lint
|
||||
gulp.task("scss-lint", function() {
|
||||
gulp.src([paths.appStyles, "!/**/bourbon/**/*.scss"])
|
||||
|
@ -88,18 +108,18 @@ gulp.task("imagemin", function () {
|
|||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
gulp.task("coffee", function() {
|
||||
return gulp.src(coffeeSources)
|
||||
return gulp.src(paths.coffee)
|
||||
.pipe(plumber())
|
||||
.pipe(coffee())
|
||||
.pipe(concat("app.js"))
|
||||
.pipe(gulp.dest("app/dist/js/"));
|
||||
.pipe(gulp.dest("dist/js/"));
|
||||
});
|
||||
|
||||
gulp.task("jslibs", function() {
|
||||
return gulp.src(externalSources)
|
||||
return gulp.src(vendorJsLibs)
|
||||
.pipe(plumber())
|
||||
.pipe(concat("libs.js"))
|
||||
.pipe(gulp.dest("app/dist/js/"));
|
||||
.pipe(gulp.dest("dist/js/"));
|
||||
});
|
||||
|
||||
gulp.task("locales", function() {
|
||||
|
@ -140,23 +160,22 @@ gulp.task("connect", function() {
|
|||
gulp.task("watch", function() {
|
||||
gulp.watch(paths.jade, ["jade"]);
|
||||
gulp.watch(paths.appStyles, ["scss-lint", "sass", "css"]);
|
||||
gulp.watch(paths.coffee, ["coffee"]);
|
||||
});
|
||||
|
||||
gulp.task("express", function() {
|
||||
var express = require("express");
|
||||
var app = express();
|
||||
|
||||
app.use("/js", express.static(__dirname + "/app/js"));
|
||||
app.use("/components", express.static(__dirname + "/app/components"));
|
||||
app.use("/dist", express.static(__dirname + "/app/dist"));
|
||||
app.use("/less", express.static(__dirname + "/app/less"));
|
||||
app.use("/img", express.static(__dirname + "/app/img"));
|
||||
app.use("/partials", express.static(__dirname + "/app/partials"));
|
||||
app.use("/fonts", express.static(__dirname + "/app/fonts"));
|
||||
app.use("/js", express.static(__dirname + "/dist/js"));
|
||||
app.use("/styles", express.static(__dirname + "/dist/styles"));
|
||||
app.use("/images", express.static(__dirname + "/dist/images"));
|
||||
app.use("/partials", express.static(__dirname + "/dist/partials"));
|
||||
app.use("/fonts", express.static(__dirname + "/dist/fonts"));
|
||||
|
||||
app.all("/*", function(req, res, next) {
|
||||
// Just send the index.html for other files to support HTML5Mode
|
||||
res.sendfile("index.html", { root: __dirname + "/app/" });
|
||||
res.sendfile("index.html", { root: __dirname + "/dist/" });
|
||||
});
|
||||
|
||||
app.listen(9001);
|
||||
|
@ -166,10 +185,14 @@ gulp.task("express", function() {
|
|||
// The default task (called when you run `gulp` from cli)
|
||||
gulp.task("default", [
|
||||
"jade",
|
||||
"template",
|
||||
"sass",
|
||||
"css",
|
||||
"copy",
|
||||
"coffee",
|
||||
"jslibs",
|
||||
"connect",
|
||||
"express",
|
||||
"watch"
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue