Skip to content

Commit

Permalink
adding debug and lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
initplatform committed Nov 20, 2019
1 parent 7733b8c commit 276fc12
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build:scripts": "node scripts/build-scripts.js",
"build:scss": "node scripts/build-scss.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.",
"keywords": [
Expand Down Expand Up @@ -38,13 +39,7 @@
"url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin.git"
},
"dependencies": {
"@fortawesome/fontawesome-free": "5.11.2",
"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"
"bootstrap": "4.3.1"
},
"devDependencies": {
"browser-sync": "2.26.7",
Expand Down
3 changes: 2 additions & 1 deletion scripts/sb-watch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const _ = require('lodash');
const chokidar = require('chokidar');
const path = require('path');
const renderAssets = require('./render-assets');
Expand Down Expand Up @@ -60,7 +61,7 @@ function _handlePug(filePath, watchEvent) {

function _renderAllPug() {
console.log('### INFO: Rendering All');
each(allFiles, (value, filePath) => {
_.each(allFiles, (value, filePath) => {
renderPug(filePath);
});
}
Expand Down
21 changes: 21 additions & 0 deletions scripts/start-debug.js
Original file line number Diff line number Diff line change
@@ -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');
}

0 comments on commit 276fc12

Please sign in to comment.