create-absolutejs 0.2.1 → 0.3.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/commands/formatProject.d.ts +6 -0
- package/dist/commands/installDependencies.d.ts +6 -0
- package/dist/constants.d.ts +4 -0
- package/dist/data.d.ts +15 -0
- package/dist/generators/configurations/addConfigurationFiles.d.ts +7 -0
- package/dist/generators/configurations/generateDrizzleConfig.d.ts +7 -0
- package/dist/generators/configurations/generatePackageJson.d.ts +7 -0
- package/dist/generators/configurations/generatePrettierrc.d.ts +2 -0
- package/dist/generators/configurations/initializeRoot.d.ts +5 -0
- package/dist/generators/db/scaffoldDatabase.d.ts +9 -0
- package/dist/generators/html/scaffoldHTML.d.ts +6 -0
- package/dist/generators/htmx/scaffoldHTMX.d.ts +2 -0
- package/dist/generators/project/generateMarkupCSS.d.ts +1 -0
- package/dist/generators/project/generateServer.d.ts +7 -0
- package/dist/generators/project/scaffoldFrontends.d.ts +8 -0
- package/dist/generators/react/scaffoldReact.d.ts +2 -0
- package/dist/generators/svelte/scaffoldSvelte.d.ts +2 -0
- package/dist/generators/vue/scaffoldVue.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +460 -517
- package/dist/messages.d.ts +14 -0
- package/dist/prompt.d.ts +2 -0
- package/dist/questions/authProvider.d.ts +1 -0
- package/dist/questions/codeQualityTool.d.ts +1 -0
- package/dist/questions/configurationType.d.ts +1 -0
- package/dist/questions/databaseEngine.d.ts +1 -0
- package/dist/questions/databaseHost.d.ts +2 -0
- package/dist/questions/directoryConfiguration.d.ts +14 -0
- package/dist/questions/frontendDirectoryConfigurations.d.ts +2 -0
- package/dist/questions/frontends.d.ts +1 -0
- package/dist/questions/htmlScriptingOption.d.ts +1 -0
- package/dist/questions/initializeGitNow.d.ts +1 -0
- package/dist/questions/installDependenciesNow.d.ts +1 -0
- package/dist/questions/orm.d.ts +1 -0
- package/dist/questions/plugins.d.ts +1 -0
- package/dist/questions/projectName.d.ts +1 -0
- package/dist/questions/useTailwind.d.ts +1 -0
- package/dist/scaffold.d.ts +8 -0
- package/dist/templates/assets/ico/favicon.ico +0 -0
- package/dist/templates/assets/png/absolutejs-temp.png +0 -0
- package/dist/templates/assets/svg/HTML5_Badge.svg +7 -0
- package/dist/templates/assets/svg/htmx-logo-black.svg +9 -0
- package/dist/templates/assets/svg/htmx-logo-white.svg +9 -0
- package/dist/templates/assets/svg/svelte-logo.svg +1 -0
- package/dist/templates/assets/svg/vue-logo.svg +4 -0
- package/dist/templates/html/pages/HTMLExample.html +66 -0
- package/dist/templates/html/scripts/typescript-example.ts +21 -0
- package/dist/templates/htmx/pages/HTMXExample.html +92 -0
- package/dist/templates/react/components/App.tsx +52 -0
- package/dist/templates/react/components/Dropdown.tsx +23 -0
- package/dist/templates/react/components/Head.tsx +34 -0
- package/dist/templates/react/pages/ReactExample.tsx +18 -0
- package/dist/templates/styles/colors.ts +11 -0
- package/dist/templates/styles/reset.css +84 -0
- package/dist/templates/svelte/components/Counter.svelte +19 -0
- package/dist/templates/svelte/composables/counter.svelte.ts +14 -0
- package/dist/templates/svelte/pages/SvelteExample.svelte +215 -0
- package/dist/templates/vue/components/CountButton.vue +39 -0
- package/dist/templates/vue/composables/useCount.ts +14 -0
- package/dist/templates/vue/pages/VueExample.vue +266 -0
- package/dist/typeGuards.d.ts +8 -0
- package/dist/types.d.ts +128 -0
- package/dist/utils/abort.d.ts +1 -0
- package/dist/utils/commandMaps.d.ts +2 -0
- package/dist/utils/getPackageVersion.d.ts +1 -0
- package/dist/utils/parseCommandLineOptions.d.ts +7 -0
- package/dist/utils/t3-utils.d.ts +7 -0
- package/package.json +8 -7
- package/dist/templates/react/hooks/useMediaQuery.ts +0 -54
- package/dist/templates/react/styles/defaultStyles.ts +0 -28
package/package.json
CHANGED
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
"create-absolutejs": "dist/index.js"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@clack/prompts": "0.
|
|
7
|
+
"@clack/prompts": "0.11.0",
|
|
8
8
|
"picocolors": "1.1.1"
|
|
9
9
|
},
|
|
10
10
|
"description": "A CLI tool to create a new AbsoluteJS project",
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@absolutejs/auth": "0.8.0",
|
|
13
12
|
"@stylistic/eslint-plugin-ts": "4.2.0",
|
|
14
13
|
"@types/bun": "latest",
|
|
15
14
|
"@types/react": "19.1.4",
|
|
@@ -22,9 +21,11 @@
|
|
|
22
21
|
"eslint-plugin-promise": "7.2.1",
|
|
23
22
|
"eslint-plugin-security": "3.0.1",
|
|
24
23
|
"prettier": "3.5.3",
|
|
25
|
-
"svelte": "
|
|
24
|
+
"prettier-plugin-svelte": "3.4.0",
|
|
25
|
+
"svelte": "5.35.2",
|
|
26
26
|
"tailwindcss": "4.1.7",
|
|
27
|
-
"typescript-eslint": "8.32.0"
|
|
27
|
+
"typescript-eslint": "8.32.0",
|
|
28
|
+
"vue": "3.5.17"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
31
|
"dist",
|
|
@@ -37,14 +38,14 @@
|
|
|
37
38
|
"typescript": "5.8.3"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
|
-
"build": "rm -rf dist && bun build src/index.ts --target node --outdir dist && cp -R src/templates dist/templates && tsc --emitDeclarationOnly --project tsconfig.json",
|
|
41
|
+
"build": "rm -rf dist && bun build src/index.ts --target node --outdir dist && cp -R src/templates dist/templates && tsc --emitDeclarationOnly --project tsconfig.build.json",
|
|
41
42
|
"dev": "rm -rf absolutejs-project && bun run src/index.ts",
|
|
42
|
-
"format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,json,mjs,md}\"",
|
|
43
|
+
"format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,json,mjs,md,svelte,html,vue}\"",
|
|
43
44
|
"lint": "eslint ./",
|
|
44
45
|
"release": "bun run format && bun run build && bun publish",
|
|
45
46
|
"test": "cd absolutejs-project && bun dev",
|
|
46
47
|
"typecheck": "bun run tsc --noEmit"
|
|
47
48
|
},
|
|
48
49
|
"type": "module",
|
|
49
|
-
"version": "0.
|
|
50
|
+
"version": "0.3.0"
|
|
50
51
|
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
type Breakpoints = {
|
|
4
|
-
xs: number;
|
|
5
|
-
sm: number;
|
|
6
|
-
md: number;
|
|
7
|
-
lg: number;
|
|
8
|
-
xl: number;
|
|
9
|
-
'2xl': number;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const defaultBreakpoints: Breakpoints = {
|
|
13
|
-
'2xl': 1536,
|
|
14
|
-
lg: 1024,
|
|
15
|
-
md: 768,
|
|
16
|
-
sm: 640,
|
|
17
|
-
xl: 1280,
|
|
18
|
-
xs: 0
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export type Breakpoint = keyof Breakpoints;
|
|
22
|
-
|
|
23
|
-
export const useMediaQuery = (customBreakpoints = defaultBreakpoints) => {
|
|
24
|
-
const [breakpoint, setBreakpoint] = useState<Breakpoint>('xs');
|
|
25
|
-
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
const handleResize = () => {
|
|
28
|
-
const { innerWidth: width } = window;
|
|
29
|
-
|
|
30
|
-
if (width < customBreakpoints.sm) {
|
|
31
|
-
setBreakpoint('xs');
|
|
32
|
-
} else if (width < customBreakpoints.md) {
|
|
33
|
-
setBreakpoint('sm');
|
|
34
|
-
} else if (width < customBreakpoints.lg) {
|
|
35
|
-
setBreakpoint('md');
|
|
36
|
-
} else if (width < customBreakpoints.xl) {
|
|
37
|
-
setBreakpoint('lg');
|
|
38
|
-
} else if (width < customBreakpoints['2xl']) {
|
|
39
|
-
setBreakpoint('xl');
|
|
40
|
-
} else {
|
|
41
|
-
setBreakpoint('2xl');
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
handleResize();
|
|
46
|
-
window.addEventListener('resize', handleResize);
|
|
47
|
-
|
|
48
|
-
return () => {
|
|
49
|
-
window.removeEventListener('resize', handleResize);
|
|
50
|
-
};
|
|
51
|
-
}, [customBreakpoints]);
|
|
52
|
-
|
|
53
|
-
return breakpoint;
|
|
54
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type CSSProperties } from 'react';
|
|
2
|
-
|
|
3
|
-
export const styleReset = `
|
|
4
|
-
* {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
font-weight: inherit;
|
|
9
|
-
}
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
export const bodyDefault: CSSProperties = {
|
|
13
|
-
backgroundColor: '#f5f5f5',
|
|
14
|
-
color: '#333',
|
|
15
|
-
display: 'flex',
|
|
16
|
-
flexDirection: 'column',
|
|
17
|
-
height: '100%',
|
|
18
|
-
margin: 0
|
|
19
|
-
};
|
|
20
|
-
export const htmlDefault: CSSProperties = {
|
|
21
|
-
fontFamily: 'Poppins, sans-serif',
|
|
22
|
-
height: '100%'
|
|
23
|
-
};
|
|
24
|
-
export const mainDefault: CSSProperties = {
|
|
25
|
-
display: 'flex',
|
|
26
|
-
flex: 1,
|
|
27
|
-
flexDirection: 'column'
|
|
28
|
-
};
|