@temir.ra/create-template 0.4.4 → 0.5.0

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.
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Version 0
2
2
 
3
+ ## 0.5.0
4
+
5
+ 1. Moved `template/` from package root to `dist/`.
6
+
3
7
  ## 0.4.4
4
8
 
5
9
  1. Synced template files with `ts-lib@0.13.0-pre.7` template.
@@ -1 +1 @@
1
- 0.4.4+3d49409
1
+ 0.5.0+49754e1
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  var __importMetaUrl = document.currentScript && document.currentScript.src || '';
3
- "use strict";(()=>{var i=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var r=i("node:fs"),o=i("node:path");var a=new URL("../",__importMetaUrl),l=new URL("dist/",a),m=new URL("buildinfo.txt",l),p=new URL("CHANGELOG.md",l),g=new URL("README.md",a),U=new URL("template/",a);try{let e=process.argv[2];if(!e)throw new Error('First argument must be the package name (e.g. "my-package" or "@my-scope/my-package").');let n=e.replace(/\\/g,"/"),t=(0,o.resolve)(process.cwd(),n);(0,r.cpSync)(U,t,{recursive:!0}),(0,r.cpSync)(p,(0,o.resolve)(t,"CHANGELOG-template.md")),(0,r.cpSync)(m,(0,o.resolve)(t,"buildinfo-template.txt")),(0,r.cpSync)(g,(0,o.resolve)(t,"README-template.md"));let c=(0,o.resolve)(t,"package.json"),s=JSON.parse((0,r.readFileSync)(c,"utf-8"));s.name=n,(0,r.writeFileSync)(c,JSON.stringify(s,null,2)),(0,r.renameSync)((0,o.resolve)(t,"gitignore"),(0,o.resolve)(t,".gitignore")),console.log(`Template has been successfully instantiated at '${t}' with package name '${n}'.`)}catch(e){let n=e instanceof Error?e:new Error(String(e));console.error("Error:",n.message),process.exit(1)}})();
3
+ "use strict";(()=>{var i=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var r=i("node:fs"),o=i("node:path");var l=new URL("../",__importMetaUrl),a=new URL("dist/",l),m=new URL("buildinfo.txt",a),p=new URL("CHANGELOG.md",a),g=new URL("README.md",l),U=new URL("template/",a);try{let e=process.argv[2];if(!e)throw new Error('First argument must be the package name (e.g. "my-package" or "@my-scope/my-package").');let n=e.replace(/\\/g,"/"),t=(0,o.resolve)(process.cwd(),n);(0,r.cpSync)(U,t,{recursive:!0}),(0,r.cpSync)(p,(0,o.resolve)(t,"CHANGELOG-template.md")),(0,r.cpSync)(m,(0,o.resolve)(t,"buildinfo-template.txt")),(0,r.cpSync)(g,(0,o.resolve)(t,"README-template.md"));let c=(0,o.resolve)(t,"package.json"),s=JSON.parse((0,r.readFileSync)(c,"utf-8"));s.name=n,(0,r.writeFileSync)(c,JSON.stringify(s,null,2)),(0,r.renameSync)((0,o.resolve)(t,"gitignore"),(0,o.resolve)(t,".gitignore")),console.log(`Template has been successfully instantiated at '${t}' with package name '${n}'.`)}catch(e){let n=e instanceof Error?e:new Error(String(e));console.error("Error:",n.message),process.exit(1)}})();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/cli.ts", "../src/package-urls.ts"],
4
- "sourcesContent": ["#!/usr/bin/env node\r\n\r\nimport { cpSync, readFileSync, renameSync, writeFileSync } from 'node:fs';\r\nimport { resolve } from 'node:path';\r\nimport {\r\n templateUrl,\r\n changelogUrl,\r\n buildinfoUrl,\r\n readmeUrl\r\n} from './package-urls.js';\r\n\r\n\r\ntry {\r\n\r\n const packageNameArgument = process.argv[2];\r\n if (!packageNameArgument)\r\n throw new Error('First argument must be the package name (e.g. \"my-package\" or \"@my-scope/my-package\").');\r\n const packageName = packageNameArgument.replace(/\\\\/g, '/');\r\n\r\n const destinationPath = resolve(process.cwd(), packageName);\r\n\r\n cpSync(templateUrl, destinationPath, { recursive: true });\r\n cpSync(changelogUrl, resolve(destinationPath, 'CHANGELOG-template.md'));\r\n cpSync(buildinfoUrl, resolve(destinationPath, 'buildinfo-template.txt'));\r\n cpSync(readmeUrl, resolve(destinationPath, 'README-template.md'));\r\n\r\n const packageJsonPath = resolve(destinationPath, 'package.json');\r\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\r\n packageJson.name = packageName;\r\n writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));\r\n\r\n renameSync(resolve(destinationPath, 'gitignore'), resolve(destinationPath, '.gitignore'));\r\n\r\n console.log(`Template has been successfully instantiated at '${destinationPath}' with package name '${packageName}'.`);\r\n\r\n}\r\ncatch (error) {\r\n const err = error instanceof Error ? error : new Error(String(error));\r\n console.error('Error:', err.message);\r\n process.exit(1);\r\n}\r\n", "export const packageUrl: URL = new URL('../', import.meta.url);\r\n\r\nexport const distUrl: URL = new URL('dist/', packageUrl);\r\nexport const buildinfoUrl: URL = new URL('buildinfo.txt', distUrl);\r\nexport const changelogUrl: URL = new URL('CHANGELOG.md', distUrl);\r\nexport const readmeUrl: URL = new URL('README.md', packageUrl);\r\n\r\nexport const templateUrl: URL = new URL('template/', packageUrl);\r\n"],
5
- "mappings": ";;4QAEA,IAAAA,EAAgE,aAChEC,EAAwB,eCHjB,IAAMC,EAAkB,IAAI,IAAI,MAAO,eAAe,EAEhDC,EAAe,IAAI,IAAI,QAASD,CAAU,EAC1CE,EAAoB,IAAI,IAAI,gBAAiBD,CAAO,EACpDE,EAAoB,IAAI,IAAI,eAAgBF,CAAO,EACnDG,EAAiB,IAAI,IAAI,YAAaJ,CAAU,EAEhDK,EAAmB,IAAI,IAAI,YAAaL,CAAU,EDK/D,GAAI,CAEA,IAAMM,EAAsB,QAAQ,KAAK,CAAC,EAC1C,GAAI,CAACA,EACD,MAAM,IAAI,MAAM,wFAAwF,EAC5G,IAAMC,EAAcD,EAAoB,QAAQ,MAAO,GAAG,EAEpDE,KAAkB,WAAQ,QAAQ,IAAI,EAAGD,CAAW,KAE1D,UAAOE,EAAaD,EAAiB,CAAE,UAAW,EAAK,CAAC,KACxD,UAAOE,KAAc,WAAQF,EAAiB,uBAAuB,CAAC,KACtE,UAAOG,KAAc,WAAQH,EAAiB,wBAAwB,CAAC,KACvE,UAAOI,KAAW,WAAQJ,EAAiB,oBAAoB,CAAC,EAEhE,IAAMK,KAAkB,WAAQL,EAAiB,cAAc,EACzDM,EAAc,KAAK,SAAM,gBAAaD,EAAiB,OAAO,CAAC,EACrEC,EAAY,KAAOP,KACnB,iBAAcM,EAAiB,KAAK,UAAUC,EAAa,KAAM,CAAC,CAAC,KAEnE,iBAAW,WAAQN,EAAiB,WAAW,KAAG,WAAQA,EAAiB,YAAY,CAAC,EAExF,QAAQ,IAAI,mDAAmDA,CAAe,wBAAwBD,CAAW,IAAI,CAEzH,OACOQ,EAAO,CACV,IAAMC,EAAMD,aAAiB,MAAQA,EAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC,EACpE,QAAQ,MAAM,SAAUC,EAAI,OAAO,EACnC,QAAQ,KAAK,CAAC,CAClB",
4
+ "sourcesContent": ["#!/usr/bin/env node\r\n\r\nimport { cpSync, readFileSync, renameSync, writeFileSync } from 'node:fs';\r\nimport { resolve } from 'node:path';\r\nimport {\r\n templateUrl,\r\n changelogUrl,\r\n buildinfoUrl,\r\n readmeUrl\r\n} from './package-urls.js';\r\n\r\n\r\ntry {\r\n\r\n const packageNameArgument = process.argv[2];\r\n if (!packageNameArgument)\r\n throw new Error('First argument must be the package name (e.g. \"my-package\" or \"@my-scope/my-package\").');\r\n const packageName = packageNameArgument.replace(/\\\\/g, '/');\r\n\r\n const destinationPath = resolve(process.cwd(), packageName);\r\n\r\n cpSync(templateUrl, destinationPath, { recursive: true });\r\n cpSync(changelogUrl, resolve(destinationPath, 'CHANGELOG-template.md'));\r\n cpSync(buildinfoUrl, resolve(destinationPath, 'buildinfo-template.txt'));\r\n cpSync(readmeUrl, resolve(destinationPath, 'README-template.md'));\r\n\r\n const packageJsonPath = resolve(destinationPath, 'package.json');\r\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\r\n packageJson.name = packageName;\r\n writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));\r\n\r\n renameSync(resolve(destinationPath, 'gitignore'), resolve(destinationPath, '.gitignore'));\r\n\r\n console.log(`Template has been successfully instantiated at '${destinationPath}' with package name '${packageName}'.`);\r\n\r\n}\r\ncatch (error) {\r\n const err = error instanceof Error ? error : new Error(String(error));\r\n console.error('Error:', err.message);\r\n process.exit(1);\r\n}\r\n", "export const packageUrl: URL = new URL('../', import.meta.url);\r\n\r\nexport const distUrl: URL = new URL('dist/', packageUrl);\r\nexport const buildinfoUrl: URL = new URL('buildinfo.txt', distUrl);\r\nexport const changelogUrl: URL = new URL('CHANGELOG.md', distUrl);\r\nexport const readmeUrl: URL = new URL('README.md', packageUrl);\r\n\r\nexport const templateUrl: URL = new URL('template/', distUrl);\r\n"],
5
+ "mappings": ";;4QAEA,IAAAA,EAAgE,aAChEC,EAAwB,eCHjB,IAAMC,EAAkB,IAAI,IAAI,MAAO,eAAe,EAEhDC,EAAe,IAAI,IAAI,QAASD,CAAU,EAC1CE,EAAoB,IAAI,IAAI,gBAAiBD,CAAO,EACpDE,EAAoB,IAAI,IAAI,eAAgBF,CAAO,EACnDG,EAAiB,IAAI,IAAI,YAAaJ,CAAU,EAEhDK,EAAmB,IAAI,IAAI,YAAaJ,CAAO,EDK5D,GAAI,CAEA,IAAMK,EAAsB,QAAQ,KAAK,CAAC,EAC1C,GAAI,CAACA,EACD,MAAM,IAAI,MAAM,wFAAwF,EAC5G,IAAMC,EAAcD,EAAoB,QAAQ,MAAO,GAAG,EAEpDE,KAAkB,WAAQ,QAAQ,IAAI,EAAGD,CAAW,KAE1D,UAAOE,EAAaD,EAAiB,CAAE,UAAW,EAAK,CAAC,KACxD,UAAOE,KAAc,WAAQF,EAAiB,uBAAuB,CAAC,KACtE,UAAOG,KAAc,WAAQH,EAAiB,wBAAwB,CAAC,KACvE,UAAOI,KAAW,WAAQJ,EAAiB,oBAAoB,CAAC,EAEhE,IAAMK,KAAkB,WAAQL,EAAiB,cAAc,EACzDM,EAAc,KAAK,SAAM,gBAAaD,EAAiB,OAAO,CAAC,EACrEC,EAAY,KAAOP,KACnB,iBAAcM,EAAiB,KAAK,UAAUC,EAAa,KAAM,CAAC,CAAC,KAEnE,iBAAW,WAAQN,EAAiB,WAAW,KAAG,WAAQA,EAAiB,YAAY,CAAC,EAExF,QAAQ,IAAI,mDAAmDA,CAAe,wBAAwBD,CAAW,IAAI,CAEzH,OACOQ,EAAO,CACV,IAAMC,EAAMD,aAAiB,MAAQA,EAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC,EACpE,QAAQ,MAAM,SAAUC,EAAI,OAAO,EACnC,QAAQ,KAAK,CAAC,CAClB",
6
6
  "names": ["import_node_fs", "import_node_path", "packageUrl", "distUrl", "buildinfoUrl", "changelogUrl", "readmeUrl", "templateUrl", "packageNameArgument", "packageName", "destinationPath", "templateUrl", "changelogUrl", "buildinfoUrl", "readmeUrl", "packageJsonPath", "packageJson", "error", "err"]
7
7
  }
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{cpSync as n,readFileSync as U,renameSync as d,writeFileSync as u}from"node:fs";import{resolve as r}from"node:path";var a=new URL("../",import.meta.url),i=new URL("dist/",a),l=new URL("buildinfo.txt",i),m=new URL("CHANGELOG.md",i),p=new URL("README.md",a),g=new URL("template/",a);try{let t=process.argv[2];if(!t)throw new Error('First argument must be the package name (e.g. "my-package" or "@my-scope/my-package").');let o=t.replace(/\\/g,"/"),e=r(process.cwd(),o);n(g,e,{recursive:!0}),n(m,r(e,"CHANGELOG-template.md")),n(l,r(e,"buildinfo-template.txt")),n(p,r(e,"README-template.md"));let c=r(e,"package.json"),s=JSON.parse(U(c,"utf-8"));s.name=o,u(c,JSON.stringify(s,null,2)),d(r(e,"gitignore"),r(e,".gitignore")),console.log(`Template has been successfully instantiated at '${e}' with package name '${o}'.`)}catch(t){let o=t instanceof Error?t:new Error(String(t));console.error("Error:",o.message),process.exit(1)}
2
+ import{cpSync as n,readFileSync as U,renameSync as d,writeFileSync as u}from"node:fs";import{resolve as r}from"node:path";var i=new URL("../",import.meta.url),a=new URL("dist/",i),l=new URL("buildinfo.txt",a),m=new URL("CHANGELOG.md",a),p=new URL("README.md",i),g=new URL("template/",a);try{let t=process.argv[2];if(!t)throw new Error('First argument must be the package name (e.g. "my-package" or "@my-scope/my-package").');let o=t.replace(/\\/g,"/"),e=r(process.cwd(),o);n(g,e,{recursive:!0}),n(m,r(e,"CHANGELOG-template.md")),n(l,r(e,"buildinfo-template.txt")),n(p,r(e,"README-template.md"));let c=r(e,"package.json"),s=JSON.parse(U(c,"utf-8"));s.name=o,u(c,JSON.stringify(s,null,2)),d(r(e,"gitignore"),r(e,".gitignore")),console.log(`Template has been successfully instantiated at '${e}' with package name '${o}'.`)}catch(t){let o=t instanceof Error?t:new Error(String(t));console.error("Error:",o.message),process.exit(1)}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/cli.ts", "../src/package-urls.ts"],
4
- "sourcesContent": ["#!/usr/bin/env node\r\n\r\nimport { cpSync, readFileSync, renameSync, writeFileSync } from 'node:fs';\r\nimport { resolve } from 'node:path';\r\nimport {\r\n templateUrl,\r\n changelogUrl,\r\n buildinfoUrl,\r\n readmeUrl\r\n} from './package-urls.js';\r\n\r\n\r\ntry {\r\n\r\n const packageNameArgument = process.argv[2];\r\n if (!packageNameArgument)\r\n throw new Error('First argument must be the package name (e.g. \"my-package\" or \"@my-scope/my-package\").');\r\n const packageName = packageNameArgument.replace(/\\\\/g, '/');\r\n\r\n const destinationPath = resolve(process.cwd(), packageName);\r\n\r\n cpSync(templateUrl, destinationPath, { recursive: true });\r\n cpSync(changelogUrl, resolve(destinationPath, 'CHANGELOG-template.md'));\r\n cpSync(buildinfoUrl, resolve(destinationPath, 'buildinfo-template.txt'));\r\n cpSync(readmeUrl, resolve(destinationPath, 'README-template.md'));\r\n\r\n const packageJsonPath = resolve(destinationPath, 'package.json');\r\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\r\n packageJson.name = packageName;\r\n writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));\r\n\r\n renameSync(resolve(destinationPath, 'gitignore'), resolve(destinationPath, '.gitignore'));\r\n\r\n console.log(`Template has been successfully instantiated at '${destinationPath}' with package name '${packageName}'.`);\r\n\r\n}\r\ncatch (error) {\r\n const err = error instanceof Error ? error : new Error(String(error));\r\n console.error('Error:', err.message);\r\n process.exit(1);\r\n}\r\n", "export const packageUrl: URL = new URL('../', import.meta.url);\r\n\r\nexport const distUrl: URL = new URL('dist/', packageUrl);\r\nexport const buildinfoUrl: URL = new URL('buildinfo.txt', distUrl);\r\nexport const changelogUrl: URL = new URL('CHANGELOG.md', distUrl);\r\nexport const readmeUrl: URL = new URL('README.md', packageUrl);\r\n\r\nexport const templateUrl: URL = new URL('template/', packageUrl);\r\n"],
5
- "mappings": ";AAEA,OAAS,UAAAA,EAAQ,gBAAAC,EAAc,cAAAC,EAAY,iBAAAC,MAAqB,UAChE,OAAS,WAAAC,MAAe,YCHjB,IAAMC,EAAkB,IAAI,IAAI,MAAO,YAAY,GAAG,EAEhDC,EAAe,IAAI,IAAI,QAASD,CAAU,EAC1CE,EAAoB,IAAI,IAAI,gBAAiBD,CAAO,EACpDE,EAAoB,IAAI,IAAI,eAAgBF,CAAO,EACnDG,EAAiB,IAAI,IAAI,YAAaJ,CAAU,EAEhDK,EAAmB,IAAI,IAAI,YAAaL,CAAU,EDK/D,GAAI,CAEA,IAAMM,EAAsB,QAAQ,KAAK,CAAC,EAC1C,GAAI,CAACA,EACD,MAAM,IAAI,MAAM,wFAAwF,EAC5G,IAAMC,EAAcD,EAAoB,QAAQ,MAAO,GAAG,EAEpDE,EAAkBC,EAAQ,QAAQ,IAAI,EAAGF,CAAW,EAE1DG,EAAOC,EAAaH,EAAiB,CAAE,UAAW,EAAK,CAAC,EACxDE,EAAOE,EAAcH,EAAQD,EAAiB,uBAAuB,CAAC,EACtEE,EAAOG,EAAcJ,EAAQD,EAAiB,wBAAwB,CAAC,EACvEE,EAAOI,EAAWL,EAAQD,EAAiB,oBAAoB,CAAC,EAEhE,IAAMO,EAAkBN,EAAQD,EAAiB,cAAc,EACzDQ,EAAc,KAAK,MAAMC,EAAaF,EAAiB,OAAO,CAAC,EACrEC,EAAY,KAAOT,EACnBW,EAAcH,EAAiB,KAAK,UAAUC,EAAa,KAAM,CAAC,CAAC,EAEnEG,EAAWV,EAAQD,EAAiB,WAAW,EAAGC,EAAQD,EAAiB,YAAY,CAAC,EAExF,QAAQ,IAAI,mDAAmDA,CAAe,wBAAwBD,CAAW,IAAI,CAEzH,OACOa,EAAO,CACV,IAAMC,EAAMD,aAAiB,MAAQA,EAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC,EACpE,QAAQ,MAAM,SAAUC,EAAI,OAAO,EACnC,QAAQ,KAAK,CAAC,CAClB",
4
+ "sourcesContent": ["#!/usr/bin/env node\r\n\r\nimport { cpSync, readFileSync, renameSync, writeFileSync } from 'node:fs';\r\nimport { resolve } from 'node:path';\r\nimport {\r\n templateUrl,\r\n changelogUrl,\r\n buildinfoUrl,\r\n readmeUrl\r\n} from './package-urls.js';\r\n\r\n\r\ntry {\r\n\r\n const packageNameArgument = process.argv[2];\r\n if (!packageNameArgument)\r\n throw new Error('First argument must be the package name (e.g. \"my-package\" or \"@my-scope/my-package\").');\r\n const packageName = packageNameArgument.replace(/\\\\/g, '/');\r\n\r\n const destinationPath = resolve(process.cwd(), packageName);\r\n\r\n cpSync(templateUrl, destinationPath, { recursive: true });\r\n cpSync(changelogUrl, resolve(destinationPath, 'CHANGELOG-template.md'));\r\n cpSync(buildinfoUrl, resolve(destinationPath, 'buildinfo-template.txt'));\r\n cpSync(readmeUrl, resolve(destinationPath, 'README-template.md'));\r\n\r\n const packageJsonPath = resolve(destinationPath, 'package.json');\r\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\r\n packageJson.name = packageName;\r\n writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));\r\n\r\n renameSync(resolve(destinationPath, 'gitignore'), resolve(destinationPath, '.gitignore'));\r\n\r\n console.log(`Template has been successfully instantiated at '${destinationPath}' with package name '${packageName}'.`);\r\n\r\n}\r\ncatch (error) {\r\n const err = error instanceof Error ? error : new Error(String(error));\r\n console.error('Error:', err.message);\r\n process.exit(1);\r\n}\r\n", "export const packageUrl: URL = new URL('../', import.meta.url);\r\n\r\nexport const distUrl: URL = new URL('dist/', packageUrl);\r\nexport const buildinfoUrl: URL = new URL('buildinfo.txt', distUrl);\r\nexport const changelogUrl: URL = new URL('CHANGELOG.md', distUrl);\r\nexport const readmeUrl: URL = new URL('README.md', packageUrl);\r\n\r\nexport const templateUrl: URL = new URL('template/', distUrl);\r\n"],
5
+ "mappings": ";AAEA,OAAS,UAAAA,EAAQ,gBAAAC,EAAc,cAAAC,EAAY,iBAAAC,MAAqB,UAChE,OAAS,WAAAC,MAAe,YCHjB,IAAMC,EAAkB,IAAI,IAAI,MAAO,YAAY,GAAG,EAEhDC,EAAe,IAAI,IAAI,QAASD,CAAU,EAC1CE,EAAoB,IAAI,IAAI,gBAAiBD,CAAO,EACpDE,EAAoB,IAAI,IAAI,eAAgBF,CAAO,EACnDG,EAAiB,IAAI,IAAI,YAAaJ,CAAU,EAEhDK,EAAmB,IAAI,IAAI,YAAaJ,CAAO,EDK5D,GAAI,CAEA,IAAMK,EAAsB,QAAQ,KAAK,CAAC,EAC1C,GAAI,CAACA,EACD,MAAM,IAAI,MAAM,wFAAwF,EAC5G,IAAMC,EAAcD,EAAoB,QAAQ,MAAO,GAAG,EAEpDE,EAAkBC,EAAQ,QAAQ,IAAI,EAAGF,CAAW,EAE1DG,EAAOC,EAAaH,EAAiB,CAAE,UAAW,EAAK,CAAC,EACxDE,EAAOE,EAAcH,EAAQD,EAAiB,uBAAuB,CAAC,EACtEE,EAAOG,EAAcJ,EAAQD,EAAiB,wBAAwB,CAAC,EACvEE,EAAOI,EAAWL,EAAQD,EAAiB,oBAAoB,CAAC,EAEhE,IAAMO,EAAkBN,EAAQD,EAAiB,cAAc,EACzDQ,EAAc,KAAK,MAAMC,EAAaF,EAAiB,OAAO,CAAC,EACrEC,EAAY,KAAOT,EACnBW,EAAcH,EAAiB,KAAK,UAAUC,EAAa,KAAM,CAAC,CAAC,EAEnEG,EAAWV,EAAQD,EAAiB,WAAW,EAAGC,EAAQD,EAAiB,YAAY,CAAC,EAExF,QAAQ,IAAI,mDAAmDA,CAAe,wBAAwBD,CAAW,IAAI,CAEzH,OACOa,EAAO,CACV,IAAMC,EAAMD,aAAiB,MAAQA,EAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC,EACpE,QAAQ,MAAM,SAAUC,EAAI,OAAO,EACnC,QAAQ,KAAK,CAAC,CAClB",
6
6
  "names": ["cpSync", "readFileSync", "renameSync", "writeFileSync", "resolve", "packageUrl", "distUrl", "buildinfoUrl", "changelogUrl", "readmeUrl", "templateUrl", "packageNameArgument", "packageName", "destinationPath", "resolve", "cpSync", "templateUrl", "changelogUrl", "buildinfoUrl", "readmeUrl", "packageJsonPath", "packageJson", "readFileSync", "writeFileSync", "renameSync", "error", "err"]
7
7
  }
@@ -15,8 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "files": [
18
- "dist/",
19
- "template/"
18
+ "dist/"
20
19
  ],
21
20
  "bin": "./dist/cli.bundle.js",
22
21
  "exports": {
@@ -126,6 +126,7 @@ const COPY_FILES: string[] = [
126
126
  "buildinfo.txt",
127
127
  "buildinfo-template.txt",
128
128
  "CHANGELOG.md",
129
+ "template/"
129
130
  ];
130
131
  const copyFiles: EsbuildPlugin = {
131
132
  name: 'copy-files',
@@ -136,7 +137,7 @@ const copyFiles: EsbuildPlugin = {
136
137
  for (const file of COPY_FILES) {
137
138
  const destination = join(outDir, file);
138
139
  if (existsSync(file)) {
139
- cpSync(file, destination);
140
+ cpSync(file, destination, { recursive: true });
140
141
  console.log(`[copy-files plugin] Copied '${file}' to '${destination}'.`);
141
142
  } else {
142
143
  console.warn(`[copy-files plugin] File '${file}' does not exist. Skipping...`);
@@ -5,4 +5,4 @@ export const buildinfoUrl: URL = new URL('buildinfo.txt', distUrl);
5
5
  export const changelogUrl: URL = new URL('CHANGELOG.md', distUrl);
6
6
  export const readmeUrl: URL = new URL('README.md', packageUrl);
7
7
 
8
- export const templateUrl: URL = new URL('template/', packageUrl);
8
+ export const templateUrl: URL = new URL('template/', distUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temir.ra/create-template",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "A template for a template package.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -15,8 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "files": [
18
- "dist/",
19
- "template/"
18
+ "dist/"
20
19
  ],
21
20
  "bin": "./dist/cli.bundle.js",
22
21
  "exports": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes