@tsmodule/tsmodule 40.0.3 → 40.0.6
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/README.md +50 -40
- package/dist/commands/build/index.js +2 -2
- package/dist/commands/convert/index.d.ts +7 -0
- package/dist/commands/convert/index.js +51 -0
- package/dist/commands/create/index.js +45 -12
- package/dist/commands/create/lib/templates.d.ts +32 -0
- package/dist/commands/create/lib/templates.js +51 -0
- package/dist/commands/dev/index.js +9 -9
- package/dist/commands/execute/index.js +4 -4
- package/dist/commands/index.js +17 -17
- package/dist/constants.d.ts +0 -8
- package/dist/constants.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +32 -32
- package/dist/specification/index.d.ts +6 -0
- package/dist/specification/index.js +4 -0
- package/dist/specification/types.d.ts +11 -0
- package/dist/{commands/create/lib/rewritePkgJson.js → specification/types.js} +0 -1
- package/dist/types/index.js +17 -17
- package/dist/utils/packageJson.d.ts +24 -0
- package/dist/utils/packageJson.js +4 -0
- package/package.json +2 -2
- package/templates/default/package.json +1 -33
- package/templates/react/package.json +1 -39
- package/dist/commands/create/lib/copyTemplate.d.ts +0 -1
- package/dist/commands/create/lib/copyTemplate.js +0 -10
- package/dist/commands/create/lib/rewritePkgJson.d.ts +0 -1
- package/dist/utils/pkgJson.d.ts +0 -2
- package/dist/utils/pkgJson.js +0 -4
@@ -0,0 +1,4 @@
|
|
1
|
+
|
2
|
+
typeof document>"u"&&await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
|
3
|
+
|
4
|
+
var e={packageJson:{type:"module",platform:"node",types:"dist/index.d.ts",files:["dist"],exports:{"./package.json":"./package.json",".":"./dist/index.js","./*":"./dist/*/index.js"},scripts:{dev:"tsmodule dev",build:"tsmodule build",test:"ava",pretest:"tsmodule build --runtime-only",prepublishOnly:"yarn build && yarn test",lint:"eslint src --fix"},ava:{timeout:24e4,files:["test/**/*.test.ts"],extensions:{ts:"module"},nodeArguments:["--no-warnings","--loader=@tsmodule/tsmodule"]}},files:["tsconfig.json",".eslintrc"],dependencies:[],devDependencies:["@types/node","@tsmodule/tsmodule","@typescript-eslint/eslint-plugin","@typescript-eslint/parser","ava","eslint","typescript"]},s={default:e,react:{packageJson:{platform:"browser",style:"dist/bundle.css",exports:{"./package.json":"./package.json",".":"./dist/index.js","./styles":"./dist/bundle.css","./styles/*":"./dist/components/*/index.css","./*":"./dist/components/*/index.js"},scripts:{export:"tsmodule build",dev:"next dev",build:"next build",start:"next start",lint:"next lint --fix",pretest:"tsmodule build --runtime-only",test:"ava",prepublishOnly:"yarn export && yarn test"},resolutions:{"@types/react":"^17.0.38","@types/react-dom":"^17.0.11"}},files:[".eslintrc","next-env.d.ts","next.config.js","postcss.config.js","tailwind.config.js"],dependencies:["react@^17.0.2","react-dom@^17.0.2"],devDependencies:[...e.devDependencies,"@types/react@^17.0.39","@types/react-dom@^17.0.11","eslint-config-next","@tsmodule/react","next","tailwindcss","autoprefixer","cssnano","postcss","postcss-import"]}};export{s as specification};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { PackageJsonSettings } from "../utils/packageJson";
|
2
|
+
export declare type TsmoduleProjectType = "default" | "react";
|
3
|
+
export interface TsModuleProjectConfig {
|
4
|
+
files: string[];
|
5
|
+
dependencies: string[];
|
6
|
+
devDependencies: string[];
|
7
|
+
packageJson: PackageJsonSettings;
|
8
|
+
}
|
9
|
+
export declare type TsmoduleSpecification = {
|
10
|
+
[key in TsmoduleProjectType]: TsModuleProjectConfig;
|
11
|
+
};
|
@@ -1,4 +1,3 @@
|
|
1
1
|
|
2
2
|
typeof document>"u"&&await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
|
3
3
|
|
4
|
-
import o from"fs/promises";import{resolve as t}from"path";var c=async s=>{let a=t(process.cwd(),s,"package.json"),n=await o.readFile(a,"utf-8"),e=JSON.parse(n);e.name=s,await o.writeFile(a,JSON.stringify(e,null,2))};export{c as rewritePkgJson};
|