layered_stack 0.0.7 → 0.0.8
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.
- checksums.yaml +4 -4
- data/lib/layered_stack/root/create.rb +1 -2
- data/lib/layered_stack/version.rb +1 -1
- data/templates/backend/rails_template.rb +2 -0
- data/templates/frontend/layout.js +28 -2
- data/templates/frontend/page.js +2 -29
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 654e3e7a8d171059086845763046456d6f1689bc58d31851878b5f50468715fd
|
4
|
+
data.tar.gz: 481d8bee09c9acd9baeb7b99cea90b0c75fd362b32b7afb50b09a5d872277976
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 973b3dd330e1339c7363fd13975c4ebadca3538175ef455ec7e892ff6e7577d02c6807cd07f9a730b46c34352edac4febc3425f1500e74ed6a59a3a9b6867a75
|
7
|
+
data.tar.gz: ec56c1d84828fe211edb6d92e2dcd1783c67c07678b7ea156de071fe5e4cdfc2dcbdb9bda251bcd8e75b63aad65d49855fff640d4ab42be8169316c60dd63c9a
|
@@ -46,7 +46,7 @@ module LayeredStack
|
|
46
46
|
|
47
47
|
def check_folder_exists?(folder)
|
48
48
|
if File.directory?(folder)
|
49
|
-
logger.info("Directory exists: #{folder}")
|
49
|
+
logger.info("Directory exists: #{folder}, aborting to avoid unintentional overwrite")
|
50
50
|
true
|
51
51
|
else
|
52
52
|
logger.info("Directory does not exist: #{folder}")
|
@@ -61,7 +61,6 @@ module LayeredStack
|
|
61
61
|
logger.info("Templates copied to #{destination}")
|
62
62
|
end
|
63
63
|
|
64
|
-
|
65
64
|
def rename_devcontainer(folder)
|
66
65
|
devcontainer_path = File.join(folder, 'devcontainer')
|
67
66
|
new_devcontainer_path = File.join(folder, '.devcontainer')
|
@@ -3,8 +3,10 @@ gem "rack-cors", "~> 2.0.2"
|
|
3
3
|
|
4
4
|
# Use a local copy of the Layered Stack Rails gem in development
|
5
5
|
if ENV['LAYERED_STACK_ENV'] == 'development'
|
6
|
+
gem "layered_stack-nextjs", path: "../layered_stack/nextjs", groups: [:development, :test]
|
6
7
|
gem "layered_stack-rails", path: "../layered_stack/rails", groups: [:development, :test]
|
7
8
|
else
|
9
|
+
gem "layered_stack-nextjs", groups: [:development, :test]
|
8
10
|
gem "layered_stack-rails", groups: [:development, :test]
|
9
11
|
end
|
10
12
|
|
@@ -1,19 +1,45 @@
|
|
1
|
-
|
1
|
+
// Next
|
2
|
+
import { ThemeProvider, useTheme } from 'next-themes'
|
2
3
|
|
4
|
+
// Packages
|
5
|
+
import { Bars3Icon } from '@heroicons/react/24/solid'
|
6
|
+
import { Page } from '@layeredstack/ui'
|
7
|
+
|
8
|
+
// Logos
|
9
|
+
import logoDark from './logo_dark.svg'
|
10
|
+
import logoLight from './logo_light.svg'
|
11
|
+
|
12
|
+
// Styles
|
3
13
|
import '@layeredstack/ui/styles/ls_ui.css'
|
4
14
|
|
15
|
+
// Metadata
|
5
16
|
export const metadata = {
|
6
17
|
initials: 'LS',
|
7
18
|
title: 'Layered Stack - UI (Example)',
|
8
19
|
description: 'Example of the Layered Stack - UI interface components',
|
9
20
|
}
|
10
21
|
|
22
|
+
// Layout
|
11
23
|
export default function RootLayout({ children }) {
|
24
|
+
const mobileMenuIcon = <Bars3Icon className="h-6 w-6" />
|
25
|
+
|
12
26
|
return (
|
13
27
|
<html lang="en" suppressHydrationWarning>
|
14
28
|
<body>
|
15
29
|
<ThemeProvider attribute='class'>
|
16
|
-
|
30
|
+
<Page
|
31
|
+
backendUrl="http://localhost:3000"
|
32
|
+
logoDark={logoDark}
|
33
|
+
logoLight={logoLight}
|
34
|
+
metadata={metadata}
|
35
|
+
// mobileMenuIcon={mobileMenuIcon}
|
36
|
+
useTheme={useTheme}
|
37
|
+
user={{
|
38
|
+
initials: 'TG'
|
39
|
+
}}
|
40
|
+
>
|
41
|
+
{children}
|
42
|
+
</Page>
|
17
43
|
</ThemeProvider>
|
18
44
|
</body>
|
19
45
|
</html>
|
data/templates/frontend/page.js
CHANGED
@@ -1,35 +1,8 @@
|
|
1
|
-
// Next
|
2
|
-
import { useTheme } from 'next-themes'
|
3
|
-
|
4
|
-
// Packages
|
5
|
-
import { Bars3Icon } from '@heroicons/react/24/solid'
|
6
|
-
import { Page } from '@layeredstack/ui'
|
7
|
-
|
8
|
-
// Local
|
9
|
-
import { metadata } from './layout.js'
|
10
|
-
|
11
|
-
// Logo
|
12
|
-
import logoDark from './logo_dark.svg'
|
13
|
-
import logoLight from './logo_light.svg'
|
14
|
-
|
15
|
-
// Home
|
16
1
|
export default function Home() {
|
17
|
-
const mobileMenuIcon = <Bars3Icon className="h-6 w-6" />
|
18
|
-
|
19
2
|
return (
|
20
|
-
|
21
|
-
backendUrl="http://localhost:3000"
|
22
|
-
logoDark={logoDark}
|
23
|
-
logoLight={logoLight}
|
24
|
-
metadata={metadata}
|
25
|
-
// mobileMenuIcon={mobileMenuIcon}
|
26
|
-
useTheme={useTheme}
|
27
|
-
user={{
|
28
|
-
initials: 'TG'
|
29
|
-
}}
|
30
|
-
>
|
3
|
+
<>
|
31
4
|
<h1>Hello world!</h1>
|
32
5
|
<p>This is a simple page.</p>
|
33
|
-
|
6
|
+
</>
|
34
7
|
)
|
35
8
|
}
|