Switch to building less files as part of build
This commit is contained in:
Родитель
850889c566
Коммит
df1812c34b
|
@ -2,6 +2,7 @@ var gulp = require("gulp");
|
|||
var browserify = require("browserify");
|
||||
var source = require("vinyl-source-stream");
|
||||
var tsify = require("tsify");
|
||||
var less = require("gulp-less");
|
||||
var plumber = require('gulp-plumber');
|
||||
var ts = require("gulp-typescript");
|
||||
var tsProject = ts.createProject("tsconfig.json", { typescript: require('typescript') });
|
||||
|
@ -16,6 +17,13 @@ gulp.task("clean", function() {
|
|||
.pipe(clean());
|
||||
})
|
||||
|
||||
// Compile from less to css files
|
||||
gulp.task("less", function () {
|
||||
return gulp.src('public/stylesheets/**/*.less')
|
||||
.pipe(less())
|
||||
.pipe(gulp.dest('./public/stylesheets/'));
|
||||
});
|
||||
|
||||
// Builds the server side JavaScript
|
||||
gulp.task("build", function () {
|
||||
var errors = false;
|
||||
|
@ -75,4 +83,4 @@ for (let controller of controllers) {
|
|||
|
||||
let browserifyTasks = controllers.map(function(controller) { return controller.name });
|
||||
|
||||
gulp.task("default", ["tslint", "build"].concat(browserifyTasks));
|
||||
gulp.task("default", ["less", "tslint", "build"].concat(browserifyTasks));
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
"gulp-sourcemaps": "^1.6.0",
|
||||
"hjs": "~0.0.6",
|
||||
"jquery": "^3.1.1",
|
||||
"less-middleware": "1.0.x",
|
||||
"lodash": "^4.16.1",
|
||||
"moment": "^2.15.1",
|
||||
"morgan": "~1.6.1",
|
||||
|
@ -97,6 +96,7 @@
|
|||
"concurrently": "^3.0.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-clean": "^0.3.2",
|
||||
"gulp-less": "^3.3.0",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
"gulp-tslint": "^7.0.1",
|
||||
"gulp-typescript": "^2.13.6",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
.selected{background-color:#CFD8DC !important;color:white}.heroes{margin:0 0 2em 0;list-style-type:none;padding:0;width:15em}.heroes li{cursor:pointer;position:relative;left:0;background-color:#EEE;margin:.5em;padding:.3em 0;height:1.6em;border-radius:4px}.heroes li.selected:hover{background-color:#BBD8DC !important;color:white}.heroes li:hover{color:#607D8B;background-color:#DDD;left:.1em}.heroes .text{position:relative;top:-3px}.heroes .badge{display:inline-block;font-size:small;color:white;padding:0.8em 0.7em 0 0.7em;background-color:#607D8B;line-height:1em;position:relative;left:-1px;top:-4px;height:1.8em;margin-right:.8em;border-radius:4px 0 0 4px}
|
|
@ -1 +0,0 @@
|
|||
html{width:100%;height:100%;overflow:hidden}body{margin:0px;padding:0px;overflow:hidden;width:100%;height:100%}
|
|
@ -1 +0,0 @@
|
|||
.datatable-body-cell{word-wrap:break-word}
|
|
@ -3,7 +3,6 @@ import * as connectRedis from "connect-redis";
|
|||
import * as cookieParser from "cookie-parser";
|
||||
import * as express from "express";
|
||||
import * as expressSession from "express-session";
|
||||
import * as lessMiddleware from "less-middleware";
|
||||
import * as moment from "moment";
|
||||
import * as logger from "morgan";
|
||||
import * as nconf from "nconf";
|
||||
|
@ -292,7 +291,6 @@ app.use(expressSession({
|
|||
secret: "bAq0XuQWqoAZzaAkQT5EXPCHBkeIEZqi",
|
||||
store: sessionStore,
|
||||
}));
|
||||
app.use(lessMiddleware(path.join(__dirname, "../public")));
|
||||
app.use(express.static(path.join(__dirname, "../public")));
|
||||
app.use("/node_modules", express.static(path.join(__dirname, "../node_modules")));
|
||||
// The below is to check to make sure the session is available (redis could have gone down for instance) and if
|
||||
|
|
Загрузка…
Ссылка в новой задаче