plutonium 0.12.11 → 0.12.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 443b2efe86f5242ef6355f8da9d8af08dbbf66ebeaf8feb3adebbe9c0858cf45
4
- data.tar.gz: 532843ca3dd3a9456e135dfa371d5110f46c726f5d86fed70a1ebe02ed8cfde5
3
+ metadata.gz: 0c1a74bfd77765d7aeb19904303c8cf548d2fbd1f98bc66ea5a6fa5abae855ef
4
+ data.tar.gz: cb49f49ed6f309e9afe7f922f968d2833cef6da89af2cab1fe8fcd4d893f4ee1
5
5
  SHA512:
6
- metadata.gz: 0d19d82bd1f5ac2a2fd4d383fffbc78d0c773213ff1c6648e44723c113ae4e6a4c8065ec2318df7738012f676547c60231aa895542a139e5d55394179476c3bc
7
- data.tar.gz: 22bbf75790b8bc214be9946f339e7d607a64e31e363bf6d76eead20713536168dbbd6838d6c4bb62f453ec168fa458c6126a48c0c083ec839c83675d71bcec91
6
+ metadata.gz: 91d30795a525042b1d63b605ad57d4b5bda2e7a3367e488244dad219024797f02281c51e0974d2e443390d98beef5eaaada1a82dcaa6d243f6b77095339d6064
7
+ data.tar.gz: 79269b68bb7411b330b07e7b9e62f31d4c8a3d1ba5bff5a5bdc23cbe30f5a2e347484c7764c8b1582bfccdf217d5a6d0f21689f5658534632fe22ad127fb1e71
@@ -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:text title:string content:text state:string published_at:datetime
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
@@ -27,6 +27,7 @@ module Pu
27
27
 
28
28
  def install_dependencies
29
29
  `yarn add @radioactive-labs/plutonium`
30
+ `yarn add flowbite @tailwindcss/forms`
30
31
  end
31
32
 
32
33
  def configure_application
@@ -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.config.js`)
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`,
@@ -1,3 +1,3 @@
1
1
  module Plutonium
2
- VERSION = "0.12.11"
2
+ VERSION = "0.12.13"
3
3
  end
data/tailwind.config.js CHANGED
@@ -1,91 +1,9 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
2
 
3
- export const content = [
4
- `${__dirname}/src/**/*.{css,js}`,
5
- `${__dirname}/app/views/**/*.{rb,erb,js}`,
6
- `${__dirname}/config/initializers/simple_form.rb`,
3
+ const options = require("./tailwind.options.js")
7
4
 
8
- // node modules are not packaged as part of the gem.
9
- // requires users to have flowbite installed in their own project.
10
- './node_modules/flowbite/**/*.js',
11
- // TODO: temporary workaround for legacy components.
12
- // To be removed after converting buttons_helper and other files containing tailwind to components .
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
@@ -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.11
4
+ version: 0.12.13
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 00:00:00.000000000 Z
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: