plutonium 0.12.11 → 0.12.12
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/# Plutonium: The pre-alpha demo.md +2 -2
- data/lib/generators/pu/core/assets/assets_generator.rb +1 -0
- data/lib/generators/pu/core/assets/templates/tailwind.config.js +2 -2
- data/lib/plutonium/version.rb +1 -1
- data/tailwind.config.js +6 -88
- data/tailwind.options.js +89 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a2acf897212a5a3c4311c5b31b90068bef1f527c01ef26f7f2786f83208b5fc
|
4
|
+
data.tar.gz: 0a1dc0f87bea2371ce6c15fea9cc9d15965a2f7c61898796da7b4f0a568813e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cfc8b3eaa72e09e3029cba86f3cce37a2892d08a6b4f4b239f560c4c4a4a5d2aacb1aae9073bd6c7239ad51ca82f6d5ea46c6a80ec0bf0310f0eda745625e95
|
7
|
+
data.tar.gz: c4fa401ee4a836fa312e8af919ed4d6b0a3092f309176471de6deab64085298d1e05163d49b1b94657ff30efc36865c42b4f54437ff0c3d3580dc3430062806b
|
@@ -7,8 +7,8 @@
|
|
7
7
|
```
|
8
8
|
- Install Plutonium
|
9
9
|
```bash
|
10
|
-
rails g pu:core:install
|
11
10
|
bundle add plutonium
|
11
|
+
rails g pu:core:install
|
12
12
|
```
|
13
13
|
- Install useful gems
|
14
14
|
```bash
|
@@ -28,7 +28,7 @@
|
|
28
28
|
```
|
29
29
|
- Create blog resource
|
30
30
|
```bash
|
31
|
-
rails g pu:res:scaffold blog user:belongs_to slug:
|
31
|
+
rails g pu:res:scaffold blog user:belongs_to slug:string title:string content:text state:string published_at:datetime
|
32
32
|
```
|
33
33
|
- Create dashboard app package
|
34
34
|
```bash
|
@@ -1,12 +1,12 @@
|
|
1
1
|
const { execSync } = require('child_process');
|
2
2
|
const plutoniumGemPath = execSync("bundle show plutonium").toString().trim();
|
3
|
-
const plutoniumTailwindConfig = require(`${plutoniumGemPath}/tailwind.
|
3
|
+
const plutoniumTailwindConfig = require(`${plutoniumGemPath}/tailwind.options.js`)
|
4
4
|
|
5
5
|
module.exports = {
|
6
6
|
darkMode: plutoniumTailwindConfig.darkMode,
|
7
7
|
plugins: [
|
8
8
|
// add plugins here
|
9
|
-
].concat(plutoniumTailwindConfig.plugins),
|
9
|
+
].concat(plutoniumTailwindConfig.plugins.map((plugin) => require(plugin))),
|
10
10
|
theme: plutoniumTailwindConfig.theme,
|
11
11
|
content: [
|
12
12
|
`${__dirname}/app/views/**/*.html.erb`,
|
data/lib/plutonium/version.rb
CHANGED
data/tailwind.config.js
CHANGED
@@ -1,91 +1,9 @@
|
|
1
1
|
/** @type {import('tailwindcss').Config} */
|
2
2
|
|
3
|
-
|
4
|
-
`${__dirname}/src/**/*.{css,js}`,
|
5
|
-
`${__dirname}/app/views/**/*.{rb,erb,js}`,
|
6
|
-
`${__dirname}/config/initializers/simple_form.rb`,
|
3
|
+
import options from "./tailwind.options.js"
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
// `${__dirname}/lib/plutonium/**/*.{rb,erb}`
|
14
|
-
];
|
15
|
-
export const darkMode = "selector";
|
16
|
-
export const plugins = [
|
17
|
-
// requires users to have the required packages installed in their own project.
|
18
|
-
require('@tailwindcss/forms'),
|
19
|
-
require('flowbite/plugin'),
|
20
|
-
];
|
21
|
-
export const theme = {
|
22
|
-
extend: {
|
23
|
-
colors: {
|
24
|
-
primary: {
|
25
|
-
'50': '#f0f7fe',
|
26
|
-
'100': '#ddecfc',
|
27
|
-
'200': '#c3dffa',
|
28
|
-
'300': '#99ccf7',
|
29
|
-
'400': '#69b0f1',
|
30
|
-
'500': '#4691eb',
|
31
|
-
'600': '#3174df',
|
32
|
-
'700': '#285fcc',
|
33
|
-
'800': '#274ea6',
|
34
|
-
'900': '#244484',
|
35
|
-
'950': '#1b2b50',
|
36
|
-
},
|
37
|
-
},
|
38
|
-
screens: {
|
39
|
-
'xs': '475px',
|
40
|
-
},
|
41
|
-
},
|
42
|
-
fontFamily: {
|
43
|
-
'body': [
|
44
|
-
'Lato',
|
45
|
-
'ui-sans-serif',
|
46
|
-
'system-ui',
|
47
|
-
'-apple-system',
|
48
|
-
'system-ui',
|
49
|
-
'Segoe UI',
|
50
|
-
'Roboto',
|
51
|
-
'Helvetica Neue',
|
52
|
-
'Arial',
|
53
|
-
'Noto Sans',
|
54
|
-
'sans-serif',
|
55
|
-
'Apple Color Emoji',
|
56
|
-
'Segoe UI Emoji',
|
57
|
-
'Segoe UI Symbol',
|
58
|
-
'Noto Color Emoji'
|
59
|
-
],
|
60
|
-
'sans': [
|
61
|
-
'Lato',
|
62
|
-
'ui-sans-serif',
|
63
|
-
'system-ui',
|
64
|
-
'-apple-system',
|
65
|
-
'system-ui',
|
66
|
-
'Segoe UI',
|
67
|
-
'Roboto',
|
68
|
-
'Helvetica Neue',
|
69
|
-
'Arial',
|
70
|
-
'Noto Sans',
|
71
|
-
'sans-serif',
|
72
|
-
'Apple Color Emoji',
|
73
|
-
'Segoe UI Emoji',
|
74
|
-
'Segoe UI Symbol',
|
75
|
-
'Noto Color Emoji'
|
76
|
-
]
|
77
|
-
}
|
78
|
-
};
|
79
|
-
|
80
|
-
|
81
|
-
// const _safelist = [];
|
82
|
-
// // Object.keys(colors).forEach((color) => {
|
83
|
-
// // if (typeof colors[color] === 'object') {
|
84
|
-
// // Object.keys(colors[color]).forEach((shade) => {
|
85
|
-
// // safelist.push(`bg-${color}-${shade}`);
|
86
|
-
// // safelist.push(`text-${color}-${shade}`);
|
87
|
-
// // // Add other utilities as needed
|
88
|
-
// // });
|
89
|
-
// // }
|
90
|
-
// // });
|
91
|
-
// export const safelist = _safelist;
|
5
|
+
export const content = options.content
|
6
|
+
export const darkMode = options.darkMode
|
7
|
+
export const plugins = options.plugins.map((plugin) => require(plugin))
|
8
|
+
export const theme = options.theme
|
9
|
+
export const safelist = options.safelist
|
data/tailwind.options.js
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
export const content = [
|
2
|
+
`${__dirname}/src/**/*.{css,js}`,
|
3
|
+
`${__dirname}/app/views/**/*.{rb,erb,js}`,
|
4
|
+
`${__dirname}/config/initializers/simple_form.rb`,
|
5
|
+
|
6
|
+
// node modules are not packaged as part of the gem.
|
7
|
+
// requires users to have flowbite installed in their own project.
|
8
|
+
'./node_modules/flowbite/**/*.js',
|
9
|
+
// TODO: temporary workaround for legacy components.
|
10
|
+
// To be removed after converting buttons_helper and other files containing tailwind to components .
|
11
|
+
// `${__dirname}/lib/plutonium/**/*.{rb,erb}`
|
12
|
+
];
|
13
|
+
export const darkMode = "selector";
|
14
|
+
export const plugins = [
|
15
|
+
// requires users to have the required packages installed in their own project.
|
16
|
+
"@tailwindcss/forms",
|
17
|
+
"flowbite/plugin"
|
18
|
+
];
|
19
|
+
export const theme = {
|
20
|
+
extend: {
|
21
|
+
colors: {
|
22
|
+
primary: {
|
23
|
+
'50': '#f0f7fe',
|
24
|
+
'100': '#ddecfc',
|
25
|
+
'200': '#c3dffa',
|
26
|
+
'300': '#99ccf7',
|
27
|
+
'400': '#69b0f1',
|
28
|
+
'500': '#4691eb',
|
29
|
+
'600': '#3174df',
|
30
|
+
'700': '#285fcc',
|
31
|
+
'800': '#274ea6',
|
32
|
+
'900': '#244484',
|
33
|
+
'950': '#1b2b50',
|
34
|
+
},
|
35
|
+
},
|
36
|
+
screens: {
|
37
|
+
'xs': '475px',
|
38
|
+
},
|
39
|
+
},
|
40
|
+
fontFamily: {
|
41
|
+
'body': [
|
42
|
+
'Lato',
|
43
|
+
'ui-sans-serif',
|
44
|
+
'system-ui',
|
45
|
+
'-apple-system',
|
46
|
+
'system-ui',
|
47
|
+
'Segoe UI',
|
48
|
+
'Roboto',
|
49
|
+
'Helvetica Neue',
|
50
|
+
'Arial',
|
51
|
+
'Noto Sans',
|
52
|
+
'sans-serif',
|
53
|
+
'Apple Color Emoji',
|
54
|
+
'Segoe UI Emoji',
|
55
|
+
'Segoe UI Symbol',
|
56
|
+
'Noto Color Emoji'
|
57
|
+
],
|
58
|
+
'sans': [
|
59
|
+
'Lato',
|
60
|
+
'ui-sans-serif',
|
61
|
+
'system-ui',
|
62
|
+
'-apple-system',
|
63
|
+
'system-ui',
|
64
|
+
'Segoe UI',
|
65
|
+
'Roboto',
|
66
|
+
'Helvetica Neue',
|
67
|
+
'Arial',
|
68
|
+
'Noto Sans',
|
69
|
+
'sans-serif',
|
70
|
+
'Apple Color Emoji',
|
71
|
+
'Segoe UI Emoji',
|
72
|
+
'Segoe UI Symbol',
|
73
|
+
'Noto Color Emoji'
|
74
|
+
]
|
75
|
+
}
|
76
|
+
};
|
77
|
+
|
78
|
+
export const safelist = [];
|
79
|
+
|
80
|
+
// // Object.keys(colors).forEach((color) => {
|
81
|
+
// // if (typeof colors[color] === 'object') {
|
82
|
+
// // Object.keys(colors[color]).forEach((shade) => {
|
83
|
+
// // safelist.push(`bg-${color}-${shade}`);
|
84
|
+
// // safelist.push(`text-${color}-${shade}`);
|
85
|
+
// // // Add other utilities as needed
|
86
|
+
// // });
|
87
|
+
// // }
|
88
|
+
// // });
|
89
|
+
// export const safelist = _safelist;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plutonium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Froelich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|
@@ -1165,6 +1165,7 @@ files:
|
|
1165
1165
|
- src/js/turbo/turbo_debug.js
|
1166
1166
|
- src/js/turbo/turbo_frame_monkey_patch.js
|
1167
1167
|
- tailwind.config.js
|
1168
|
+
- tailwind.options.js
|
1168
1169
|
- templates/base.rb
|
1169
1170
|
homepage: https://github.com/radioactive-labs/plutonium-core
|
1170
1171
|
licenses:
|