maglevcms 1.0.0.rc1 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.babelrc +9 -0
- data/.eslintrc.js +49 -0
- data/Rakefile +0 -11
- data/app/models/maglev/asset.rb +1 -1
- data/bin/webpack +18 -0
- data/bin/webpack-dev-server +18 -0
- data/lib/maglev/engine.rb +2 -1
- data/lib/maglev/version.rb +1 -1
- data/package.json +81 -0
- data/postcss.config.js +14 -0
- data/tailwind.config.js +62 -0
- data/yarn.lock +11188 -0
- metadata +12 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f205f2ae920d055133ec837c7f04d43ca923d27cbd95e7785bdd4cbe497796a1
|
4
|
+
data.tar.gz: 424959b7ab45781b85594454b888290665e6155f43b3447c47b2290bbb0a0461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab8d2c4ff31d18b546c16ccce544d3ed3ce48efbb3d0a5b0a3844de9178ac11281a037fa34743e32c59ce206b73a331540f28c2ec68075865be9e1eee80da117
|
7
|
+
data.tar.gz: 92b880a54c1b409fe9d3075626bb27df6b59f713ab3881bc1d0f9b93d91a14c9d1e04132dbcfb0603988375e933d293333fc3ad43533c000682a3a6033153d85
|
data/.babelrc
ADDED
data/.eslintrc.js
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
module.exports = {
|
2
|
+
root: true,
|
3
|
+
env: {
|
4
|
+
browser: true,
|
5
|
+
node: true,
|
6
|
+
jest: true,
|
7
|
+
},
|
8
|
+
extends: [
|
9
|
+
'plugin:vue/essential',
|
10
|
+
'eslint:recommended',
|
11
|
+
'@vue/prettier',
|
12
|
+
],
|
13
|
+
parserOptions: {
|
14
|
+
ecmaVersion: 2020,
|
15
|
+
},
|
16
|
+
rules: {
|
17
|
+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
18
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
19
|
+
quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
|
20
|
+
'prettier/prettier': [
|
21
|
+
'warn',
|
22
|
+
{
|
23
|
+
semi: false,
|
24
|
+
trailingComma: 'all',
|
25
|
+
singleQuote: true,
|
26
|
+
printWidth: 80,
|
27
|
+
tabWidth: 2,
|
28
|
+
arrow_parens: 'avoid',
|
29
|
+
endOfLine: 'lf',
|
30
|
+
},
|
31
|
+
],
|
32
|
+
},
|
33
|
+
overrides: [
|
34
|
+
{
|
35
|
+
files: [
|
36
|
+
'**/__tests__/*.{j,t}s?(x)',
|
37
|
+
'**/tests/unit/**/*.spec.{j,t}s?(x)',
|
38
|
+
],
|
39
|
+
env: {
|
40
|
+
jest: true,
|
41
|
+
},
|
42
|
+
},
|
43
|
+
],
|
44
|
+
ignorePatterns: [
|
45
|
+
"app/javascript/controllers/**/*.js",
|
46
|
+
"app/javascript/packs/**/*.js",
|
47
|
+
"app/javascript/utils/**/*.js"
|
48
|
+
],
|
49
|
+
}
|
data/Rakefile
CHANGED
@@ -18,17 +18,6 @@ end
|
|
18
18
|
|
19
19
|
APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
|
20
20
|
load 'rails/tasks/engine.rake'
|
21
|
-
|
22
21
|
load 'rails/tasks/statistics.rake'
|
23
22
|
|
24
23
|
require 'bundler/gem_tasks'
|
25
|
-
|
26
|
-
require 'rake/testtask'
|
27
|
-
|
28
|
-
Rake::TestTask.new(:test) do |t|
|
29
|
-
t.libs << 'test'
|
30
|
-
t.pattern = 'test/**/*_test.rb'
|
31
|
-
t.verbose = false
|
32
|
-
end
|
33
|
-
|
34
|
-
task default: :test
|
data/app/models/maglev/asset.rb
CHANGED
data/bin/webpack
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
4
|
+
ENV["NODE_ENV"] ||= "development"
|
5
|
+
|
6
|
+
require "pathname"
|
7
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
8
|
+
Pathname.new(__FILE__).realpath)
|
9
|
+
|
10
|
+
require "bundler/setup"
|
11
|
+
|
12
|
+
require "webpacker"
|
13
|
+
require "webpacker/webpack_runner"
|
14
|
+
|
15
|
+
APP_ROOT = File.expand_path("..", __dir__)
|
16
|
+
Dir.chdir(APP_ROOT) do
|
17
|
+
Webpacker::WebpackRunner.run(ARGV)
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
4
|
+
ENV["NODE_ENV"] ||= "development"
|
5
|
+
|
6
|
+
require "pathname"
|
7
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
8
|
+
Pathname.new(__FILE__).realpath)
|
9
|
+
|
10
|
+
require "bundler/setup"
|
11
|
+
|
12
|
+
require "webpacker"
|
13
|
+
require "webpacker/dev_server_runner"
|
14
|
+
|
15
|
+
APP_ROOT = File.expand_path("..", __dir__)
|
16
|
+
Dir.chdir(APP_ROOT) do
|
17
|
+
Webpacker::DevServerRunner.run(ARGV)
|
18
|
+
end
|
data/lib/maglev/engine.rb
CHANGED
@@ -55,7 +55,8 @@ module Maglev
|
|
55
55
|
|
56
56
|
# Serves the engine's webpack when requested
|
57
57
|
initializer 'maglev.webpacker.static' do |app|
|
58
|
-
app.config.middleware.
|
58
|
+
app.config.middleware.insert_before(
|
59
|
+
1,
|
59
60
|
Rack::Static,
|
60
61
|
urls: ['/maglev-packs'],
|
61
62
|
root: File.expand_path(File.join(__dir__, '..', '..', 'public'))
|
data/lib/maglev/version.rb
CHANGED
data/package.json
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
{
|
2
|
+
"name": "maglev",
|
3
|
+
"private": true,
|
4
|
+
"scripts": {
|
5
|
+
"prettier-format": "prettier --config .prettierrc 'app/javascript/**/*.{vue,js}' --write",
|
6
|
+
"test": "jest"
|
7
|
+
},
|
8
|
+
"dependencies": {
|
9
|
+
"axios": "^0.21.1",
|
10
|
+
"camelcase-object-deep": "^1.1.3",
|
11
|
+
"normalizr": "^3.6.1",
|
12
|
+
"stimulus": "^2.0.0",
|
13
|
+
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
|
14
|
+
"tiptap": "^1.31.0",
|
15
|
+
"tiptap-extensions": "^1.34.0",
|
16
|
+
"turbolinks": "^5.2.0",
|
17
|
+
"v-tooltip": "^2.1.3",
|
18
|
+
"vue": "^2.6.12",
|
19
|
+
"vue-i18n": "^8.21.1",
|
20
|
+
"vue-loader": "^15.9.3",
|
21
|
+
"vue-router": "^3.4.4",
|
22
|
+
"vue-template-compiler": "^2.6.12",
|
23
|
+
"vue-window-size": "0.6.2",
|
24
|
+
"vuedraggable": "^2.24.3",
|
25
|
+
"vuex": "^3.5.1"
|
26
|
+
},
|
27
|
+
"version": "0.1.0",
|
28
|
+
"devDependencies": {
|
29
|
+
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
|
30
|
+
"@rails/webpacker": "5.4.3",
|
31
|
+
"@vue/cli-plugin-eslint": "^4.5.13",
|
32
|
+
"@vue/eslint-config-prettier": "^6.0.0",
|
33
|
+
"@vue/test-utils": "^1.3.0",
|
34
|
+
"autoprefixer": "^9",
|
35
|
+
"babel-jest": "^27.4.5",
|
36
|
+
"babel-plugin-transform-runtime": "^6.23.0",
|
37
|
+
"babel-preset-env": "^1.7.0",
|
38
|
+
"eslint": "^7.30.0",
|
39
|
+
"eslint-loader": "^4.0.2",
|
40
|
+
"eslint-plugin-prettier": "^3.4.0",
|
41
|
+
"eslint-plugin-vue": "^7.13.0",
|
42
|
+
"install": "^0.13.0",
|
43
|
+
"jest": "^27.4.5",
|
44
|
+
"postcss": "^7.0.36",
|
45
|
+
"prettier": "^2.3.2",
|
46
|
+
"vue-svg-loader": "^0.17.0-beta.2",
|
47
|
+
"webpack-dev-server": "^3.11.3"
|
48
|
+
},
|
49
|
+
"resolutions": {
|
50
|
+
"prosemirror-model": "^1.11.2",
|
51
|
+
"glob-parent": "^5.1.2",
|
52
|
+
"nth-check": "^2.0.1",
|
53
|
+
"ansi-regex": "^5.0.1",
|
54
|
+
"node-forge": "^1.3.0",
|
55
|
+
"postcss": "^7.0.36",
|
56
|
+
"minimist": "^1.2.6",
|
57
|
+
"eventsource": "^1.1.1",
|
58
|
+
"terser": "^5.14.2",
|
59
|
+
"async": "^2.6.4"
|
60
|
+
},
|
61
|
+
"jest": {
|
62
|
+
"roots": [
|
63
|
+
"app/javascript/editor"
|
64
|
+
],
|
65
|
+
"testMatch": [
|
66
|
+
"**/__tests__/**/*.spec.js"
|
67
|
+
],
|
68
|
+
"moduleFileExtensions": [
|
69
|
+
"js",
|
70
|
+
"json",
|
71
|
+
"vue"
|
72
|
+
],
|
73
|
+
"moduleNameMapper": {
|
74
|
+
"@/(.*)$": "<rootDir>/app/javascript/editor/$1"
|
75
|
+
},
|
76
|
+
"transform": {
|
77
|
+
"^.+\\.js$": "<rootDir>/node_modules/babel-jest"
|
78
|
+
},
|
79
|
+
"testEnvironment": "jsdom"
|
80
|
+
}
|
81
|
+
}
|
data/postcss.config.js
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module.exports = {
|
2
|
+
plugins: [
|
3
|
+
require('postcss-import'),
|
4
|
+
require('postcss-flexbugs-fixes'),
|
5
|
+
require('tailwindcss'),
|
6
|
+
require('autoprefixer'),
|
7
|
+
require('postcss-preset-env')({
|
8
|
+
autoprefixer: {
|
9
|
+
flexbox: 'no-2009'
|
10
|
+
},
|
11
|
+
stage: 3
|
12
|
+
})
|
13
|
+
]
|
14
|
+
}
|
data/tailwind.config.js
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
module.exports = {
|
2
|
+
purge: {
|
3
|
+
enabled: ['production', 'staging'].includes(process.env.NODE_ENV),
|
4
|
+
content: [
|
5
|
+
'./**/*.html.erb',
|
6
|
+
'./app/helpers/**/*.rb',
|
7
|
+
'./app/javascript/**/*.{js,vue}',
|
8
|
+
],
|
9
|
+
},
|
10
|
+
darkMode: false, // or 'media' or 'class'
|
11
|
+
theme: {
|
12
|
+
extend: {
|
13
|
+
colors: {
|
14
|
+
'editor-primary': 'var(--editor-color-primary)',
|
15
|
+
'gray': {
|
16
|
+
'100': '#f5f5f5',
|
17
|
+
'200': '#eeeeee',
|
18
|
+
'300': '#e0e0e0',
|
19
|
+
'400': '#bdbdbd',
|
20
|
+
'500': '#9e9e9e',
|
21
|
+
'600': '#757575',
|
22
|
+
'700': '#616161',
|
23
|
+
'800': '#424242',
|
24
|
+
'900': '#212121',
|
25
|
+
}
|
26
|
+
},
|
27
|
+
spacing: {
|
28
|
+
'full': '100%',
|
29
|
+
'1/2': '0.125rem',
|
30
|
+
'72': '18rem',
|
31
|
+
'84': '21rem',
|
32
|
+
'96': '24rem',
|
33
|
+
'104': '26rem',
|
34
|
+
'108': '27rem',
|
35
|
+
'120': '30rem',
|
36
|
+
'128': '32rem',
|
37
|
+
'144': '36rem',
|
38
|
+
'168': '42rem',
|
39
|
+
'216': '54rem',
|
40
|
+
},
|
41
|
+
inset: {
|
42
|
+
'0': 0,
|
43
|
+
'full': '100%',
|
44
|
+
'auto': 'auto',
|
45
|
+
'12': '3rem',
|
46
|
+
'16': '4rem',
|
47
|
+
'20': '5rem',
|
48
|
+
'24': '6rem',
|
49
|
+
'32': '8rem',
|
50
|
+
},
|
51
|
+
},
|
52
|
+
fontFamily: {
|
53
|
+
'nunito': ['Nunito Sans', 'sans-serif'],
|
54
|
+
},
|
55
|
+
},
|
56
|
+
variants: {
|
57
|
+
extend: {
|
58
|
+
opacity: ['responsive', 'hover', 'focus', 'disabled'],
|
59
|
+
},
|
60
|
+
},
|
61
|
+
plugins: [],
|
62
|
+
}
|