cob-cli 2.13.2 → 2.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,13 +8,17 @@ const {Transform} = require('stream')
|
|
|
8
8
|
|
|
9
9
|
function copy(source, target, substitutions = {}) {
|
|
10
10
|
console.log(" Copying template files to '" + target + "'...")
|
|
11
|
+
|
|
12
|
+
let srcPath = path.resolve(__dirname,source)
|
|
13
|
+
let nodeModuleRegex = RegExp(srcPath+".*/node_modules/")
|
|
14
|
+
|
|
11
15
|
return new Promise(async (resolve) => {
|
|
12
16
|
// Source is on cob-cli repo and Destination on the server repo
|
|
13
17
|
await ncp(path.resolve(__dirname,source),
|
|
14
18
|
target,
|
|
15
19
|
{
|
|
16
20
|
clobber: true,
|
|
17
|
-
filter: (src) => src.match(
|
|
21
|
+
filter: (src) => src.match(nodeModuleRegex) == null,
|
|
18
22
|
// TODO: comentado porque não funciona a copiar os ficheiros binários (em concreto as font no template/dashboards/dash)
|
|
19
23
|
// transform(read, write) {
|
|
20
24
|
// const replaceVars = new Transform({
|
package/package.json
CHANGED