mirror of https://github.com/ColorlibHQ/AdminLTE
Merge pull request #2180 from Leviasan/v3-dev
Changing module to work with the file system. Remove 'ncp'.pull/2184/head
commit
7a28ca5ac2
|
@ -1,5 +1,5 @@
|
||||||
const Plugins = require('./Plugins')
|
const Plugins = require('./Plugins')
|
||||||
const ncp = require('ncp').ncp
|
const fse = require('fs-extra')
|
||||||
|
|
||||||
class Publish {
|
class Publish {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -27,7 +27,7 @@ class Publish {
|
||||||
run() {
|
run() {
|
||||||
// Publish files
|
// Publish files
|
||||||
Plugins.forEach((module) => {
|
Plugins.forEach((module) => {
|
||||||
ncp(module.from, module.to, error => {
|
fse.copy(module.from, module.to, error => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error(`Error: ${error}`)
|
console.error(`Error: ${error}`)
|
||||||
} else if (this.options.verbose) {
|
} else if (this.options.verbose) {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"js": "npm-run-all --sequential js-compile js-minify",
|
"js": "npm-run-all --sequential js-compile js-minify",
|
||||||
"js-compile": "rollup --config build/config/rollup.config.js --sourcemap",
|
"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",
|
"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",
|
"plugins": "node build/npm/Publish.js -v",
|
||||||
"sync": "browser-sync start --server --files *.html pages/ dist/",
|
"sync": "browser-sync start --server --files *.html pages/ dist/",
|
||||||
"watch": "npm-run-all --parallel watch-css watch-js",
|
"watch": "npm-run-all --parallel watch-css watch-js",
|
||||||
|
@ -96,7 +96,6 @@
|
||||||
"eslint-plugin-compat": "^2.7.0",
|
"eslint-plugin-compat": "^2.7.0",
|
||||||
"extract-text-webpack-plugin": "^3.0.2",
|
"extract-text-webpack-plugin": "^3.0.2",
|
||||||
"fs-extra": "^5.0.0",
|
"fs-extra": "^5.0.0",
|
||||||
"ncp": "^2.0.0",
|
|
||||||
"node-sass": "^4.12.0",
|
"node-sass": "^4.12.0",
|
||||||
"nodemon": "^1.19.1",
|
"nodemon": "^1.19.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
|
|
Loading…
Reference in New Issue