From 377d2718de497908851088007671dc5657add7a7 Mon Sep 17 00:00:00 2001 From: Aleksandr Rogozin Date: Sat, 20 Jul 2019 11:50:19 +0300 Subject: [PATCH 1/2] Changing module to work with the file system. --- build/npm/Publish.js | 4 ++-- package.json | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/npm/Publish.js b/build/npm/Publish.js index 13ffc71f5..c5f323854 100644 --- a/build/npm/Publish.js +++ b/build/npm/Publish.js @@ -1,5 +1,5 @@ const Plugins = require('./Plugins') -const ncp = require('ncp').ncp +const fse = require('fs-extra') class Publish { constructor() { @@ -27,7 +27,7 @@ class Publish { run() { // Publish files Plugins.forEach((module) => { - ncp(module.from, module.to, error => { + fse.copy(module.from, module.to, error => { if (error) { console.error(`Error: ${error}`) } else if (this.options.verbose) { diff --git a/package.json b/package.json index c56757e7b..364b7d05b 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,6 @@ "eslint-plugin-compat": "^2.7.0", "extract-text-webpack-plugin": "^3.0.2", "fs-extra": "^5.0.0", - "ncp": "^2.0.0", "node-sass": "^4.12.0", "nodemon": "^1.19.1", "npm-run-all": "^4.1.5", From 2e7c44faa34e225ddb4ef86f9b4558765cdf867d Mon Sep 17 00:00:00 2001 From: Aleksandr Rogozin Date: Sat, 20 Jul 2019 12:02:23 +0300 Subject: [PATCH 2/2] Update package json scripts --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 364b7d05b..48c96b561 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "js": "npm-run-all --sequential js-compile js-minify", "js-compile": "rollup --config build/config/rollup.config.js --sourcemap", "js-minify": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/adminlte.js.map,includeSources,url=adminlte.min.js.map\" --output dist/js/adminlte.min.js dist/js/adminlte.js", - "production": "npm-run-all --parallel compile && node build/npm/Publish.js -v", + "production": "npm-run-all --parallel compile plugins", "plugins": "node build/npm/Publish.js -v", "sync": "browser-sync start --server --files *.html pages/ dist/", "watch": "npm-run-all --parallel watch-css watch-js",