From 7dc38d8438a101914bff9400b335bb1d0ae65434 Mon Sep 17 00:00:00 2001 From: Nasir Hussain Date: Wed, 5 Feb 2020 01:14:35 +0500 Subject: [PATCH 1/4] Updated gitignore file --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 61185717..d19126c4 100644 --- a/.gitignore +++ b/.gitignore @@ -118,3 +118,6 @@ fabric.properties # Virtual env .venv* + +package-lock.json +*.db From 9e4a54dad786456bd243b761ae944e5d5b24363c Mon Sep 17 00:00:00 2001 From: Nasir Hussain Date: Wed, 5 Feb 2020 01:15:28 +0500 Subject: [PATCH 2/4] Updated node packages --- package.json | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 20878738..99c96166 100644 --- a/package.json +++ b/package.json @@ -21,18 +21,23 @@ }, "homepage": "https://github.com/jazzband/django-silk", "devDependencies": { - "async": "^1.2.0", - "babel-core": "^5.5.3", - "babel-loader": "^5.1.4", - "gulp": "^3.8.10", - "gulp-rename": "^1.2.2", - "gulp-scss": "^1.1.1", - "gulp-shell": "^0.4.2", + "@babel/core": "^7.8.4", + "@babel/preset-env": "^7.8.4", + "async": "^3.1.1", + "babel-loader": "^8.0.6", + "gulp": "^4.0.2", + "gulp-load-plugins": "^2.0.2", + "gulp-rename": "^2.0.0", + "gulp-sass": "^4.0.2", + "gulp-shell": "^0.7.1", "gulp-util": "^3.0.5", "gulp-webpack": "^1.4.0", - "node-libs-browser": "^0.5.2", + "node-libs-browser": "^2.2.1", "q": "^1.4.1", "underscore": "^1.8.3", - "webpack": "^1.9.10" + "webpack": "^4.41.5" + }, + "dependencies": { + "node-sass": "^4.13.1" } } From 6203fc707b5c27f8570bc776edd8bcc7008dbadf Mon Sep 17 00:00:00 2001 From: Nasir Hussain Date: Wed, 5 Feb 2020 01:16:19 +0500 Subject: [PATCH 3/4] Fixed gulp file --- gulpfile.js | 85 +++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index db36d7a5..278816ac 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,57 +1,58 @@ -var gulp = require('gulp'), +let gulp = require('gulp'), async = require('async'), _ = require('underscore'), - plugins = require('gulp-load-plugins')(); - - -var webpack = { - externals: { - 'react': 'React', - 'jQuery': '$', - 'underscore': '_', - 'moment': 'moment', - 'async': 'async' - }, - devtool: 'inline-source-map', - module: { - loaders: [ - { - test: /\.js$/, - exclude: /node_modules/, - loader: 'babel-loader' - } - ] - } + plugins = require('gulp-load-plugins')(), + sass = require('gulp-sass'); + + +let webpack = { + externals: { + 'react': 'React', + 'jQuery': '$', + 'underscore': '_', + 'moment': 'moment', + 'async': 'async' + }, + devtool: 'inline-source-map', + module: { + loaders: [ + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel-loader' + } + ] + } }; gulp.task('watch', function () { - gulp.watch('scss/**/*.scss', ['scss']); + gulp.watch('scss/**/*.scss', gulp.series('scss')); }); -gulp.task('scss', function () { - gulp.src('scss/**/*.scss') - .pipe(plugins.scss()) - .pipe(gulp.dest('silk/static/silk/css')) +gulp.task('sass', function () { + return gulp.src('scss/**/*.scss') + .pipe(sass().on('error', sass.logError)) + .pipe(gulp.dest('silk/static/silk/css')); }); -var apps = { - summary: 'js/summary/index.js' +let apps = { + summary: 'js/summary/index.js' }; gulp.task('js', function (done) { - var appNames = Object.keys(apps), - tasks = _.map(appNames, function (appName) { - return function (done) { - var path = apps[appName], - config = _.extend({}, webpack); - gulp.src(path) - .pipe(plugins.webpack(config)) - .pipe(plugins.rename(appName + '.js')) - .pipe(gulp.dest('silk/static/silk/js')) - .on('end', done); - } - }); - async.parallel(tasks, done); + let appNames = Object.keys(apps), + tasks = _.map(appNames, function (appName) { + return function (done) { + var path = apps[appName], + config = _.extend({}, webpack); + gulp.src(path) + .pipe(plugins.webpack(config)) + .pipe(plugins.rename(appName + '.js')) + .pipe(gulp.dest('silk/static/silk/js')) + .on('end', done); + } + }); + async.parallel(tasks, done); }); From 8ec373cc724a0711c9e01038a8fc571b60551bec Mon Sep 17 00:00:00 2001 From: Nasir Hussain Date: Wed, 5 Feb 2020 01:16:42 +0500 Subject: [PATCH 4/4] Updated static files --- silk/static/silk/css/cell.css | 2 +- silk/static/silk/css/colors.css | 2 +- silk/static/silk/css/fonts.css | 13 ++++++++++++- silk/static/silk/css/heading.css | 2 +- silk/static/silk/css/numeric.css | 2 +- silk/static/silk/css/summary.css | 2 +- silk/static/silk/js/summary.js | 12 +++++------- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/silk/static/silk/css/cell.css b/silk/static/silk/css/cell.css index 28e0a35e..83141d72 100644 --- a/silk/static/silk/css/cell.css +++ b/silk/static/silk/css/cell.css @@ -22,4 +22,4 @@ font-size: 20px; } .cell .path-div { font-size: 18px; - margin-bottom: 15px; } \ No newline at end of file + margin-bottom: 15px; } diff --git a/silk/static/silk/css/colors.css b/silk/static/silk/css/colors.css index fe3e2615..f997544e 100644 --- a/silk/static/silk/css/colors.css +++ b/silk/static/silk/css/colors.css @@ -11,4 +11,4 @@ color: #be5b43; } .very-bad-font-color { - color: #b9424f; } \ No newline at end of file + color: #b9424f; } diff --git a/silk/static/silk/css/fonts.css b/silk/static/silk/css/fonts.css index cc5acc8e..7c10e1b1 100644 --- a/silk/static/silk/css/fonts.css +++ b/silk/static/silk/css/fonts.css @@ -5,38 +5,46 @@ font-family: FiraSans; src: url(../fonts/fira/FiraSans-Regular.woff); font-weight: normal; } + @font-face { font-family: FiraSans; src: url(../fonts/fira/FiraSans-Medium.woff); font-weight: bold; } + @font-face { font-family: FiraSans; src: url(../fonts/fira/FiraSans-Bold.woff); font-weight: bolder; } + @font-face { font-family: FiraSans; src: url(../fonts/fira/FiraSans-Light.woff); font-weight: lighter; } + @font-face { font-family: FiraSans; src: url(../fonts/fira/FiraSans-RegularItalic.woff); font-weight: normal; font-style: italic; } + @font-face { font-family: FiraSans; src: url(../fonts/fira/FiraSans-MediumItalic.woff); font-weight: bold; font-style: italic; } + @font-face { font-family: FiraSans; src: url(../fonts/fira/FiraSans-BoldItalic.woff); font-weight: bolder; font-style: italic; } + @font-face { font-family: FiraSans; src: url(../fonts/fira/FiraSans-LightItalic.woff); font-weight: lighter; font-style: italic; } + /** * Fantasque */ @@ -44,17 +52,20 @@ font-family: Fantasque; src: url(../fonts/fantasque/FantasqueSansMono-Regular.woff); font-weight: normal; } + @font-face { font-family: Fantasque; src: url(../fonts/fantasque/FantasqueSansMono-Bold.woff); font-weight: bold; } + @font-face { font-family: Fantasque; src: url(../fonts/fantasque/FantasqueSansMono-RegItalic.woff); font-weight: normal; font-style: italic; } + @font-face { font-family: Fantasque; src: url(../fonts/fantasque/FantasqueSansMono-BoldItalic.woff); font-weight: bold; - font-style: italic; } \ No newline at end of file + font-style: italic; } diff --git a/silk/static/silk/css/heading.css b/silk/static/silk/css/heading.css index 4176a8ff..f702b983 100644 --- a/silk/static/silk/css/heading.css +++ b/silk/static/silk/css/heading.css @@ -9,4 +9,4 @@ display: table-cell; text-align: left; padding: 0; - vertical-align: middle; } \ No newline at end of file + vertical-align: middle; } diff --git a/silk/static/silk/css/numeric.css b/silk/static/silk/css/numeric.css index 35df5bbb..de378219 100644 --- a/silk/static/silk/css/numeric.css +++ b/silk/static/silk/css/numeric.css @@ -8,4 +8,4 @@ font-size: 12px; } .numeric { - font-size: 20px; } \ No newline at end of file + font-size: 20px; } diff --git a/silk/static/silk/css/summary.css b/silk/static/silk/css/summary.css index 4a1bff5b..e4a521ea 100644 --- a/silk/static/silk/css/summary.css +++ b/silk/static/silk/css/summary.css @@ -15,4 +15,4 @@ font-weight: bold; } .description { - text-align: left; } \ No newline at end of file + text-align: left; } diff --git a/silk/static/silk/js/summary.js b/silk/static/silk/js/summary.js index 563fb06f..a9f80fb3 100644 --- a/silk/static/silk/js/summary.js +++ b/silk/static/silk/js/summary.js @@ -42,18 +42,16 @@ /************************************************************************/ /******/ ([ /* 0 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - 'use strict'; - var React = __webpack_require__(1); -/***/ }, +/***/ }), /* 1 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { module.exports = React; -/***/ } +/***/ }) /******/ ]); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgNjkyMDE5OGMwODk5YWM3YmQzOWUiLCJ3ZWJwYWNrOi8vLy4vanMvc3VtbWFyeS9pbmRleC5qcyIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJSZWFjdFwiIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7Ozs7QUN0Q0EsS0FBSSxLQUFLLEdBQUcsbUJBQU8sQ0FBQyxDQUFPLENBQUMsQzs7Ozs7O0FDQTVCLHdCIiwiZmlsZSI6IjY5MjAxOThjMDg5OWFjN2JkMzllLmpzIiwic291cmNlc0NvbnRlbnQiOlsiIFx0Ly8gVGhlIG1vZHVsZSBjYWNoZVxuIFx0dmFyIGluc3RhbGxlZE1vZHVsZXMgPSB7fTtcblxuIFx0Ly8gVGhlIHJlcXVpcmUgZnVuY3Rpb25cbiBcdGZ1bmN0aW9uIF9fd2VicGFja19yZXF1aXJlX18obW9kdWxlSWQpIHtcblxuIFx0XHQvLyBDaGVjayBpZiBtb2R1bGUgaXMgaW4gY2FjaGVcbiBcdFx0aWYoaW5zdGFsbGVkTW9kdWxlc1ttb2R1bGVJZF0pXG4gXHR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