create-absolutejs 0.8.3 → 0.9.1
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/LICENSE +24 -24
- package/README.md +179 -179
- package/dist/data.js +3 -0
- package/dist/generators/configurations/generateDrizzleConfig.js +15 -15
- package/dist/generators/configurations/generatePrettierrc.js +9 -9
- package/dist/generators/configurations/initializeRoot.js +2 -0
- package/dist/generators/db/dockerInitTemplates.js +79 -79
- package/dist/generators/db/generateDatabaseTypes.js +6 -6
- package/dist/generators/db/generateDockerContainer.js +19 -19
- package/dist/generators/db/generateDrizzleSchema.js +17 -17
- package/dist/generators/db/generateSqliteSchema.js +8 -8
- package/dist/generators/db/handlerTemplates.js +259 -259
- package/dist/generators/db/scaffoldDocker.js +1 -1
- package/dist/generators/html/generateHTMLPage.js +60 -60
- package/dist/generators/htmx/generateHTMXPage.js +86 -86
- package/dist/generators/project/generateAbsoluteAuthConfig.js +96 -96
- package/dist/generators/project/generateBuildBlock.d.ts +2 -1
- package/dist/generators/project/generateBuildBlock.js +9 -5
- package/dist/generators/project/generateDBBlock.js +9 -9
- package/dist/generators/project/generateImportsBlock.js +1 -0
- package/dist/generators/project/generateMarkupCSS.js +145 -145
- package/dist/generators/project/generateRoutesBlock.js +36 -36
- package/dist/generators/project/generateServer.d.ts +2 -1
- package/dist/generators/project/generateServer.js +29 -19
- package/dist/generators/project/scaffoldBackend.d.ts +2 -1
- package/dist/generators/project/scaffoldBackend.js +2 -1
- package/dist/generators/react/generateReactComponents.js +95 -95
- package/dist/generators/svelte/generateSveltePage.js +210 -210
- package/dist/generators/vue/generateVuePage.js +261 -261
- package/dist/messages.js +43 -43
- package/dist/scaffold.js +1 -0
- package/dist/templates/README.md +35 -35
- package/dist/templates/assets/svg/google-logo.svg +7 -7
- package/dist/templates/assets/svg/htmx-logo-black.svg +9 -9
- package/dist/templates/assets/svg/htmx-logo-white.svg +9 -9
- package/dist/templates/assets/svg/vue-logo.svg +4 -4
- package/dist/templates/configurations/.prettierignore +3 -3
- package/dist/templates/configurations/.prettierrc.json +9 -9
- package/dist/templates/configurations/drizzle.config.ts +13 -13
- package/dist/templates/configurations/eslint.config.mjs +243 -243
- package/dist/templates/configurations/tsconfig.example.json +98 -98
- package/dist/templates/constants.ts +2 -2
- package/dist/templates/db/docker-compose.db.yml +15 -15
- package/dist/templates/git/gitignore +51 -51
- package/dist/templates/html/scripts/typescript-example.ts +21 -21
- package/dist/templates/react/components/App.tsx +52 -52
- package/dist/templates/react/components/Head.tsx +34 -34
- package/dist/templates/react/components/OAuthLink.tsx +39 -39
- package/dist/templates/react/components/ProfilePicture.tsx +56 -56
- package/dist/templates/styles/colors.ts +11 -11
- package/dist/templates/styles/reset.css +84 -84
- package/dist/templates/svelte/components/Counter.svelte +19 -19
- package/dist/templates/svelte/composables/counter.svelte.ts +14 -14
- package/dist/templates/tailwind/postcss.config.ts +8 -8
- package/dist/templates/tailwind/tailwind.config.ts +7 -7
- package/dist/templates/tailwind/tailwind.css +1 -1
- package/dist/templates/vue/components/CountButton.vue +39 -39
- package/dist/templates/vue/composables/useCount.ts +14 -14
- package/dist/versions.d.ts +1 -1
- package/dist/versions.js +1 -1
- package/package.json +2 -2
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Projects */
|
|
6
|
-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
7
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
9
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
10
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
-
|
|
13
|
-
/* Language and Environment */
|
|
14
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
15
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
16
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
17
|
-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
18
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
19
|
-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
20
|
-
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
21
|
-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
22
|
-
/* JavaScript Support */
|
|
23
|
-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
24
|
-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
25
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
26
|
-
/* Emit */
|
|
27
|
-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
28
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
29
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
30
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
31
|
-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
32
|
-
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
|
33
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
34
|
-
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
35
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
36
|
-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
37
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
38
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
39
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
40
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
41
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
42
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
43
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
44
|
-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
45
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
46
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
47
|
-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
48
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
49
|
-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
50
|
-
/* Interop Constraints */
|
|
51
|
-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
52
|
-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
53
|
-
"esModuleInterop": true, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
54
|
-
/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ "forceConsistentCasingInFileNames": true, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
55
|
-
/* Ensure that casing is correct in imports. */ "jsx": "react-jsx", // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
56
|
-
/* Specify what JSX code is generated. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
57
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
58
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
59
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
60
|
-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
61
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
62
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
63
|
-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
64
|
-
/* Modules */
|
|
65
|
-
"module": "ESNext", // "rootDir": "./", /* Specify the root folder within your source files. */
|
|
66
|
-
/* Specify what module code is generated. */ "moduleResolution": "bundler", // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
67
|
-
/* Specify how TypeScript looks up a file from a given module specifier. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
68
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
69
|
-
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
70
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
71
|
-
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
72
|
-
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
73
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
74
|
-
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
75
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
76
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
77
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
78
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
79
|
-
"noUncheckedIndexedAccess": true, // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
80
|
-
/* Add 'undefined' to a type when accessed using an index. */ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
81
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
82
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
83
|
-
/* Completeness */
|
|
84
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
85
|
-
"skipLibCheck": true /* Type Checking */,
|
|
86
|
-
/* Skip type checking all .d.ts files. */ "strict": true /* Visit https://aka.ms/tsconfig to read more about this file */,
|
|
87
|
-
/* Enable all strict type-checking options. */ /* Projects */
|
|
88
|
-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
89
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
90
|
-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
91
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
92
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
93
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
94
|
-
/* Language and Environment */
|
|
95
|
-
"target": "ESNext"
|
|
96
|
-
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ /* Skip type checking all .d.ts files. */
|
|
97
|
-
}
|
|
98
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Projects */
|
|
6
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
7
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
9
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
10
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
+
|
|
13
|
+
/* Language and Environment */
|
|
14
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
15
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
16
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
17
|
+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
18
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
19
|
+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
20
|
+
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
21
|
+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
22
|
+
/* JavaScript Support */
|
|
23
|
+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
24
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
25
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
26
|
+
/* Emit */
|
|
27
|
+
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
28
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
29
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
30
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
31
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
32
|
+
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
|
33
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
34
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
35
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
36
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
37
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
38
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
39
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
40
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
41
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
42
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
43
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
44
|
+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
45
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
46
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
47
|
+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
48
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
49
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
50
|
+
/* Interop Constraints */
|
|
51
|
+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
52
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
53
|
+
"esModuleInterop": true, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
54
|
+
/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ "forceConsistentCasingInFileNames": true, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
55
|
+
/* Ensure that casing is correct in imports. */ "jsx": "react-jsx", // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
56
|
+
/* Specify what JSX code is generated. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
57
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
58
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
59
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
60
|
+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
61
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
62
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
63
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
64
|
+
/* Modules */
|
|
65
|
+
"module": "ESNext", // "rootDir": "./", /* Specify the root folder within your source files. */
|
|
66
|
+
/* Specify what module code is generated. */ "moduleResolution": "bundler", // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
67
|
+
/* Specify how TypeScript looks up a file from a given module specifier. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
68
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
69
|
+
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
70
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
71
|
+
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
72
|
+
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
73
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
74
|
+
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
75
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
76
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
77
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
78
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
79
|
+
"noUncheckedIndexedAccess": true, // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
80
|
+
/* Add 'undefined' to a type when accessed using an index. */ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
81
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
82
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
83
|
+
/* Completeness */
|
|
84
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
85
|
+
"skipLibCheck": true /* Type Checking */,
|
|
86
|
+
/* Skip type checking all .d.ts files. */ "strict": true /* Visit https://aka.ms/tsconfig to read more about this file */,
|
|
87
|
+
/* Enable all strict type-checking options. */ /* Projects */
|
|
88
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
89
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
90
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
91
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
92
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
93
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
94
|
+
/* Language and Environment */
|
|
95
|
+
"target": "ESNext"
|
|
96
|
+
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ /* Skip type checking all .d.ts files. */
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const HOURS_IN_DAY = 24;
|
|
2
|
-
export const TWO_THIRDS = 2 / 3;
|
|
1
|
+
export const HOURS_IN_DAY = 24;
|
|
2
|
+
export const TWO_THIRDS = 2 / 3;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
services:
|
|
2
|
-
db:
|
|
3
|
-
image: postgres:15
|
|
4
|
-
restart: always
|
|
5
|
-
environment:
|
|
6
|
-
POSTGRES_USER: postgres
|
|
7
|
-
POSTGRES_PASSWORD: postgres
|
|
8
|
-
POSTGRES_DB: appdb
|
|
9
|
-
ports:
|
|
10
|
-
- "5432:5432"
|
|
11
|
-
volumes:
|
|
12
|
-
- db_data:/var/lib/postgresql/data
|
|
13
|
-
|
|
14
|
-
volumes:
|
|
15
|
-
db_data:
|
|
1
|
+
services:
|
|
2
|
+
db:
|
|
3
|
+
image: postgres:15
|
|
4
|
+
restart: always
|
|
5
|
+
environment:
|
|
6
|
+
POSTGRES_USER: postgres
|
|
7
|
+
POSTGRES_PASSWORD: postgres
|
|
8
|
+
POSTGRES_DB: appdb
|
|
9
|
+
ports:
|
|
10
|
+
- "5432:5432"
|
|
11
|
+
volumes:
|
|
12
|
+
- db_data:/var/lib/postgresql/data
|
|
13
|
+
|
|
14
|
+
volumes:
|
|
15
|
+
db_data:
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
/.pnp
|
|
6
|
-
.pnp.js
|
|
7
|
-
|
|
8
|
-
# testing
|
|
9
|
-
/coverage
|
|
10
|
-
|
|
11
|
-
# next.js
|
|
12
|
-
/.next/
|
|
13
|
-
/out/
|
|
14
|
-
|
|
15
|
-
# misc
|
|
16
|
-
.DS_Store
|
|
17
|
-
*.pem
|
|
18
|
-
/build/*.js
|
|
19
|
-
/example/build/
|
|
20
|
-
# debug
|
|
21
|
-
npm-debug.log*
|
|
22
|
-
yarn-debug.log*
|
|
23
|
-
yarn-error.log*
|
|
24
|
-
|
|
25
|
-
# local env files
|
|
26
|
-
**/*.env
|
|
27
|
-
|
|
28
|
-
# vercel
|
|
29
|
-
.vercel
|
|
30
|
-
|
|
31
|
-
**/*.trace
|
|
32
|
-
**/*.zip
|
|
33
|
-
**/*.tar.gz
|
|
34
|
-
**/*.tgz
|
|
35
|
-
**/*.log
|
|
36
|
-
package-lock.json
|
|
37
|
-
**/*.bun
|
|
38
|
-
**/*.lockb
|
|
39
|
-
|
|
40
|
-
/db/migrations/meta
|
|
41
|
-
/db/migrations/*.sql
|
|
42
|
-
|
|
43
|
-
#local build files
|
|
44
|
-
**/build/src/
|
|
45
|
-
/build
|
|
46
|
-
/drizzle
|
|
47
|
-
|
|
48
|
-
# index files
|
|
49
|
-
**/indexes/*
|
|
50
|
-
|
|
51
|
-
# dist folder
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
/node_modules
|
|
5
|
+
/.pnp
|
|
6
|
+
.pnp.js
|
|
7
|
+
|
|
8
|
+
# testing
|
|
9
|
+
/coverage
|
|
10
|
+
|
|
11
|
+
# next.js
|
|
12
|
+
/.next/
|
|
13
|
+
/out/
|
|
14
|
+
|
|
15
|
+
# misc
|
|
16
|
+
.DS_Store
|
|
17
|
+
*.pem
|
|
18
|
+
/build/*.js
|
|
19
|
+
/example/build/
|
|
20
|
+
# debug
|
|
21
|
+
npm-debug.log*
|
|
22
|
+
yarn-debug.log*
|
|
23
|
+
yarn-error.log*
|
|
24
|
+
|
|
25
|
+
# local env files
|
|
26
|
+
**/*.env
|
|
27
|
+
|
|
28
|
+
# vercel
|
|
29
|
+
.vercel
|
|
30
|
+
|
|
31
|
+
**/*.trace
|
|
32
|
+
**/*.zip
|
|
33
|
+
**/*.tar.gz
|
|
34
|
+
**/*.tgz
|
|
35
|
+
**/*.log
|
|
36
|
+
package-lock.json
|
|
37
|
+
**/*.bun
|
|
38
|
+
**/*.lockb
|
|
39
|
+
|
|
40
|
+
/db/migrations/meta
|
|
41
|
+
/db/migrations/*.sql
|
|
42
|
+
|
|
43
|
+
#local build files
|
|
44
|
+
**/build/src/
|
|
45
|
+
/build
|
|
46
|
+
/drizzle
|
|
47
|
+
|
|
48
|
+
# index files
|
|
49
|
+
**/indexes/*
|
|
50
|
+
|
|
51
|
+
# dist folder
|
|
52
52
|
/dist
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const button = document.querySelector<HTMLButtonElement>('#counter-button');
|
|
2
|
-
const counter = document.querySelector<HTMLSpanElement>('#counter');
|
|
3
|
-
const details = document.querySelector<HTMLDetailsElement>('header details');
|
|
4
|
-
|
|
5
|
-
if (!button || !counter || !details) {
|
|
6
|
-
throw new Error('Required elements not found');
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
let count = 0;
|
|
10
|
-
|
|
11
|
-
button.addEventListener('click', () => {
|
|
12
|
-
counter.textContent = (++count).toString();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
details.addEventListener('pointerenter', () => {
|
|
16
|
-
details.open = true;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
details.addEventListener('pointerleave', () => {
|
|
20
|
-
details.open = false;
|
|
21
|
-
});
|
|
1
|
+
const button = document.querySelector<HTMLButtonElement>('#counter-button');
|
|
2
|
+
const counter = document.querySelector<HTMLSpanElement>('#counter');
|
|
3
|
+
const details = document.querySelector<HTMLDetailsElement>('header details');
|
|
4
|
+
|
|
5
|
+
if (!button || !counter || !details) {
|
|
6
|
+
throw new Error('Required elements not found');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let count = 0;
|
|
10
|
+
|
|
11
|
+
button.addEventListener('click', () => {
|
|
12
|
+
counter.textContent = (++count).toString();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
details.addEventListener('pointerenter', () => {
|
|
16
|
+
details.open = true;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
details.addEventListener('pointerleave', () => {
|
|
20
|
+
details.open = false;
|
|
21
|
+
});
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
type AppProps = { initialCount: number };
|
|
4
|
-
|
|
5
|
-
export const App = ({ initialCount }: AppProps) => {
|
|
6
|
-
const [count, setCount] = useState(initialCount);
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<main>
|
|
10
|
-
<nav>
|
|
11
|
-
<a href="https://absolutejs.com" target="_blank">
|
|
12
|
-
<img
|
|
13
|
-
className="logo"
|
|
14
|
-
src="/assets/png/absolutejs-temp.png"
|
|
15
|
-
alt="AbsoluteJS Logo"
|
|
16
|
-
/>
|
|
17
|
-
</a>
|
|
18
|
-
<a href="https://react.dev/">
|
|
19
|
-
<img
|
|
20
|
-
className="logo react"
|
|
21
|
-
src="/assets/svg/react.svg"
|
|
22
|
-
alt="React Logo"
|
|
23
|
-
/>
|
|
24
|
-
</a>
|
|
25
|
-
</nav>
|
|
26
|
-
<h1>AbsoluteJS + React</h1>
|
|
27
|
-
<button onClick={() => setCount(count + 1)}>
|
|
28
|
-
count is {count}
|
|
29
|
-
</button>
|
|
30
|
-
<p>
|
|
31
|
-
Edit <code>example/react/pages/ReactExample.tsx</code> then save
|
|
32
|
-
and refresh to update the page.
|
|
33
|
-
</p>
|
|
34
|
-
<p style={{ color: '#777' }}>
|
|
35
|
-
( Hot Module Reloading is coming soon )
|
|
36
|
-
</p>
|
|
37
|
-
<p style={{ marginTop: '2rem' }}>
|
|
38
|
-
Explore the other pages to see how AbsoluteJS seamlessly unifies
|
|
39
|
-
multiple frameworks on a single server.
|
|
40
|
-
</p>
|
|
41
|
-
<p
|
|
42
|
-
style={{
|
|
43
|
-
color: '#777',
|
|
44
|
-
fontSize: '1rem',
|
|
45
|
-
marginTop: '2rem'
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
Click on the AbsoluteJS and React logos to learn more.
|
|
49
|
-
</p>
|
|
50
|
-
</main>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
type AppProps = { initialCount: number };
|
|
4
|
+
|
|
5
|
+
export const App = ({ initialCount }: AppProps) => {
|
|
6
|
+
const [count, setCount] = useState(initialCount);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<main>
|
|
10
|
+
<nav>
|
|
11
|
+
<a href="https://absolutejs.com" target="_blank">
|
|
12
|
+
<img
|
|
13
|
+
className="logo"
|
|
14
|
+
src="/assets/png/absolutejs-temp.png"
|
|
15
|
+
alt="AbsoluteJS Logo"
|
|
16
|
+
/>
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://react.dev/">
|
|
19
|
+
<img
|
|
20
|
+
className="logo react"
|
|
21
|
+
src="/assets/svg/react.svg"
|
|
22
|
+
alt="React Logo"
|
|
23
|
+
/>
|
|
24
|
+
</a>
|
|
25
|
+
</nav>
|
|
26
|
+
<h1>AbsoluteJS + React</h1>
|
|
27
|
+
<button onClick={() => setCount(count + 1)}>
|
|
28
|
+
count is {count}
|
|
29
|
+
</button>
|
|
30
|
+
<p>
|
|
31
|
+
Edit <code>example/react/pages/ReactExample.tsx</code> then save
|
|
32
|
+
and refresh to update the page.
|
|
33
|
+
</p>
|
|
34
|
+
<p style={{ color: '#777' }}>
|
|
35
|
+
( Hot Module Reloading is coming soon )
|
|
36
|
+
</p>
|
|
37
|
+
<p style={{ marginTop: '2rem' }}>
|
|
38
|
+
Explore the other pages to see how AbsoluteJS seamlessly unifies
|
|
39
|
+
multiple frameworks on a single server.
|
|
40
|
+
</p>
|
|
41
|
+
<p
|
|
42
|
+
style={{
|
|
43
|
+
color: '#777',
|
|
44
|
+
fontSize: '1rem',
|
|
45
|
+
marginTop: '2rem'
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
Click on the AbsoluteJS and React logos to learn more.
|
|
49
|
+
</p>
|
|
50
|
+
</main>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
type HeadProps = {
|
|
2
|
-
title?: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
icon?: string;
|
|
5
|
-
font?: string;
|
|
6
|
-
cssPath?: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const Head = ({
|
|
10
|
-
title = 'AbsoluteJS + React',
|
|
11
|
-
description = 'AbsoluteJS React Example',
|
|
12
|
-
icon = '/assets/ico/favicon.ico',
|
|
13
|
-
font = 'Poppins',
|
|
14
|
-
cssPath
|
|
15
|
-
}: HeadProps) => (
|
|
16
|
-
<head>
|
|
17
|
-
<meta charSet="utf-8" />
|
|
18
|
-
<title>{title}</title>
|
|
19
|
-
<meta name="description" content={description} />
|
|
20
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
21
|
-
<link rel="icon" href={icon} />
|
|
22
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
23
|
-
<link
|
|
24
|
-
rel="preconnect"
|
|
25
|
-
href="https://fonts.gstatic.com"
|
|
26
|
-
crossOrigin="anonymous"
|
|
27
|
-
/>
|
|
28
|
-
<link
|
|
29
|
-
href={`https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`}
|
|
30
|
-
rel="stylesheet"
|
|
31
|
-
/>
|
|
32
|
-
{cssPath && <link rel="stylesheet" href={cssPath} type="text/css" />}
|
|
33
|
-
</head>
|
|
34
|
-
);
|
|
1
|
+
type HeadProps = {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
font?: string;
|
|
6
|
+
cssPath?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Head = ({
|
|
10
|
+
title = 'AbsoluteJS + React',
|
|
11
|
+
description = 'AbsoluteJS React Example',
|
|
12
|
+
icon = '/assets/ico/favicon.ico',
|
|
13
|
+
font = 'Poppins',
|
|
14
|
+
cssPath
|
|
15
|
+
}: HeadProps) => (
|
|
16
|
+
<head>
|
|
17
|
+
<meta charSet="utf-8" />
|
|
18
|
+
<title>{title}</title>
|
|
19
|
+
<meta name="description" content={description} />
|
|
20
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
21
|
+
<link rel="icon" href={icon} />
|
|
22
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
23
|
+
<link
|
|
24
|
+
rel="preconnect"
|
|
25
|
+
href="https://fonts.gstatic.com"
|
|
26
|
+
crossOrigin="anonymous"
|
|
27
|
+
/>
|
|
28
|
+
<link
|
|
29
|
+
href={`https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`}
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
/>
|
|
32
|
+
{cssPath && <link rel="stylesheet" href={cssPath} type="text/css" />}
|
|
33
|
+
</head>
|
|
34
|
+
);
|