adding debug and lodash

This commit is contained in:
Sam Artioli 2019-11-19 20:06:34 -05:00
parent 7733b8c71c
commit 276fc12861
3 changed files with 26 additions and 9 deletions

View file

@ -9,7 +9,8 @@
"build:scripts": "node scripts/build-scripts.js", "build:scripts": "node scripts/build-scripts.js",
"build:scss": "node scripts/build-scss.js", "build:scss": "node scripts/build-scss.js",
"clean": "node scripts/clean.js", "clean": "node scripts/clean.js",
"start": "npm run build && node scripts/start.js" "start": "npm run build && node scripts/start.js",
"start:debug": "npm run build && node scripts/start-debug.js"
}, },
"description": "A free admin dashboard template based on Bootstrap 4, created by Start Bootstrap.", "description": "A free admin dashboard template based on Bootstrap 4, created by Start Bootstrap.",
"keywords": [ "keywords": [
@ -38,13 +39,7 @@
"url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin.git" "url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin.git"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "5.11.2", "bootstrap": "4.3.1"
"bootstrap": "4.3.1",
"chart.js": "^2.9.2",
"datatables.net-bs4": "^1.10.20",
"feather-icons": "4.24.1",
"jquery": "^3.4.1",
"jquery.easing": "^1.4.1"
}, },
"devDependencies": { "devDependencies": {
"browser-sync": "2.26.7", "browser-sync": "2.26.7",

View file

@ -1,5 +1,6 @@
'use strict'; 'use strict';
const _ = require('lodash');
const chokidar = require('chokidar'); const chokidar = require('chokidar');
const path = require('path'); const path = require('path');
const renderAssets = require('./render-assets'); const renderAssets = require('./render-assets');
@ -60,7 +61,7 @@ function _handlePug(filePath, watchEvent) {
function _renderAllPug() { function _renderAllPug() {
console.log('### INFO: Rendering All'); console.log('### INFO: Rendering All');
each(allFiles, (value, filePath) => { _.each(allFiles, (value, filePath) => {
renderPug(filePath); renderPug(filePath);
}); });
} }

21
scripts/start-debug.js Normal file
View file

@ -0,0 +1,21 @@
const concurrently = require('concurrently');
concurrently([
{ command: 'node --inspect scripts/sb-watch.js', name: 'SB_WATCH', prefixColor: 'bgBlue.bold' },
{
command: 'node_modules/.bin/browser-sync dist -w --no-online',
name: 'SB_WATCH',
prefixColor: 'bgBlue.bold',
}
], {
prefix: 'name',
killOthers: ['failure', 'success'],
}).then(success, failure);
function success() {
console.log('Success');
}
function failure() {
console.log('Failure');
}