@joystick.js/cli-canary 0.0.0-canary.665 → 0.0.0-canary.667

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.
@@ -1 +1 @@
1
- const e=[{path:"css",regex:new RegExp(/^css\//)},{path:"i18n",regex:new RegExp(/^i18n\//)},{path:"public",regex:new RegExp(/^public\//)},{path:"private",regex:new RegExp(/^private\//)},{path:"index.html",regex:new RegExp(/^index.html/)},{path:"index.css",regex:new RegExp(/^index.css/)},{path:"package.json",regex:new RegExp(/^package.json/)},{path:"package-lock.json",regex:new RegExp(/^package-lock.json/)},{path:"settings.development.json",regex:new RegExp(/^settings.development.json/)},{path:"settings.staging.json",regex:new RegExp(/^settings.staging.json/)},{path:"settings.test.json",regex:new RegExp(/^settings.test.json/)},{path:"settings.production.json",regex:new RegExp(/^settings.production.json/)},{path:".html",regex:new RegExp(/^([0-9a-zA-Z-._])+.html/)}];var t=e;export{t as default};
1
+ const e=[{path:"css",regex:new RegExp(process.platform==="win32"?/^css\\/:/^css\//)},{path:"i18n",regex:new RegExp(process.platform==="win32"?/^i18n\\/:/^i18n\//)},{path:"public",regex:new RegExp(process.platform==="win32"?/^public\\/:/^public\//)},{path:"private",regex:new RegExp(process.platform==="win32"?/^private\\/:/^private\//)},{path:"index.html",regex:new RegExp(/^index.html/)},{path:"index.css",regex:new RegExp(/^index.css/)},{path:"package.json",regex:new RegExp(/^package.json/)},{path:"package-lock.json",regex:new RegExp(/^package-lock.json/)},{path:"settings.development.json",regex:new RegExp(/^settings.development.json/)},{path:"settings.staging.json",regex:new RegExp(/^settings.staging.json/)},{path:"settings.test.json",regex:new RegExp(/^settings.test.json/)},{path:"settings.production.json",regex:new RegExp(/^settings.production.json/)},{path:".html",regex:new RegExp(/^([0-9a-zA-Z-._])+.html/)}];var t=e;export{t as default};
@@ -1 +1 @@
1
- import s from"./copy_paths.js";const r=(t="")=>s.some(e=>e.regex.test(t)),c=(t="")=>t==="js",_=(t="")=>{const e=t?.split(".")?.pop(),i=c(e),o=r(t);return!i||i&&o?"copy_file":"build_file"};var p=_;export{p as default};
1
+ import i from"./copy_paths.js";const r=(t="")=>i.some(e=>(console.log(e,t),e.regex.test(t))),c=(t="")=>t==="js",n=(t="")=>{const e=t?.split(".")?.pop(),o=c(e),s=r(t);return!o||o&&s?"copy_file":"build_file"};var p=n;export{p as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
3
  "type": "module",
4
- "version": "0.0.0-canary.665",
4
+ "version": "0.0.0-canary.667",
5
5
  "description": "The CLI for Joystick.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -1,8 +1,8 @@
1
1
  const copy_paths = [
2
- { path: "css", regex: new RegExp(/^css\//) },
3
- { path: "i18n", regex: new RegExp(/^i18n\//) },
4
- { path: "public", regex: new RegExp(/^public\//) },
5
- { path: "private", regex: new RegExp(/^private\//) },
2
+ { path: "css", regex: new RegExp(process.platform === 'win32' ? /^css\\/ : /^css\//) },
3
+ { path: "i18n", regex: new RegExp(process.platform === 'win32' ? /^i18n\\/ : /^i18n\//) },
4
+ { path: "public", regex: new RegExp(process.platform === 'win32' ? /^public\\/ : /^public\//) },
5
+ { path: "private", regex: new RegExp(process.platform === 'win32' ? /^private\\/ : /^private\//) },
6
6
  { path: "index.html", regex: new RegExp(/^index.html/) },
7
7
  { path: "index.css", regex: new RegExp(/^index.css/) },
8
8
  { path: "package.json", regex: new RegExp(/^package.json/) },
@@ -2,6 +2,7 @@ import copy_paths from "./copy_paths.js";
2
2
 
3
3
  const check_if_is_copy_path = (path = '') => {
4
4
  return copy_paths.some((file_to_copy) => {
5
+ console.log(file_to_copy, path);
5
6
  return file_to_copy.regex.test(path);
6
7
  });
7
8
  };