Skip to content

Commit 76c2bec

Browse files
authored
Update Twig and update changelog for release (#481)
1 parent b251ac2 commit 76c2bec

File tree

7 files changed

+105
-45
lines changed

7 files changed

+105
-45
lines changed

_build/gpm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"lowCaseName": "fred",
44
"description": "Frontend Editor",
55
"author": "John Peca",
6-
"version": "2.0.3-pl",
6+
"version": "2.1.0-pl",
77
"menus": [
88
{
99
"text": "fred.menu.fred",

core/components/fred/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"twig/twig": "^1.0",
3+
"twig/twig": "^3.6",
44
"wa72/htmlpagedom": "^1.3",
55
"ramsey/uuid": "^3.0",
66
"moontoast/math": "^1.1",

core/components/fred/composer.lock

Lines changed: 11 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
Tweaks to the rebuild processor for more consistent results
1+
- Various stability fixes (now 40% less likely to fall off your desk)
2+
- Update Twig to 3.x
3+
- Update elFinder to use yarn and composer instead of manual insertion
4+
- Update JWT token for security
5+
- Adjust how elements are parsed during rebuild and manager saves
6+
- Fix blueprint categories in manager
7+
- Remove some lingering MODX Revo 2.x references
Lines changed: 80 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,87 @@
1-
---------------------------------------
2-
Fred
3-
---------------------------------------
4-
Version: 1.2.1
5-
Author: John Peca <john@modx.com>
6-
---------------------------------------
7-
Fred is a visual drag-and-drop front-end editor for MODX Revolution.
1+
# Fred
82

9-
Documentation: https://modxcms.github.io/fred
3+
Full documentation for Fred: https://modxcms.github.io/fred/
104

11-
Fred Extras, including ready-to-use Themes: https://modx.com/extras/browse/?search=fred
5+
Fred is a visual drag-and-drop **fr**ont-end **ed**itor for [MODX CMS](https://modx.com). It empowers ordinary people to create exceptional content without knowing how to code or needing to learn complex interfaces.
126

7+
To create content with Fred you merely drag Elements from a sidebar and drop them where you wish content to appear. Select the copy you wish to change or click an image you want to update, edit directly in your browser, and click a green checkmark to save.
138

14-
UPGRADE NOTES
15-
=======================================
9+
Fred uses familiar visual controls like sliders, toggles and color pickers. Further, these controls can pass specific parameters developers want end users to adjust to backend code or an API. This results in a bulletproof and powerful content creation solution.
10+
11+
In short, Fred makes constructing beautiful and complex pages simple for even the most non-technical of users.
12+
13+
## What does Fred do for developers and site builders?
14+
15+
Fred offers theme builders a great entrance into the MODX ecosystem. It is easy to port existing themes to Fred and export them for submission to the [MODX Extras](https://modx.com/extras/).
16+
17+
For existing MODX developers, Fred brings an option to create more flexible and intuitive editing experiences for site owners. Fred can power designs that would otherwise require dozens of TVs, a complex Manager UI, or tricky Manager customization.
18+
19+
The changelog for the current version of Fred is located at https://github.com/modxcms/fred/blob/master/core/components/fred/docs/changelog.txt.
20+
21+
## How is Fred different from other visual content builders?
22+
23+
Fred adheres to MODX’s core tenet of Creative Freedom. It doesn’t force you into someone else’s preferred front-end framework or way of building things. If you can imagine or prototype it, Fred can power it—without compromise.
24+
25+
Developers and designers can realize pixel-perfect websites and confidently turn over content creation duties without fear of things breaking.
26+
27+
So whether a site is made by customizing a free starter theme, or handcrafted 100% from scratch, Fred can help everyone build websites faster, more consistently and with better results.
28+
29+
## What Else Can Fred Do?
30+
31+
The following is a sample of Fred’s capabilities that make it a compelling visual content building platform:
32+
33+
- Transform static Design Libraries into a live content creating tool that strictly adheres to brand standards, and that is easily understood and used by non-technical team members across your entire organization
34+
- Use optional conditional/looping Twig template logic to create robust Elements limited only by your imagination
35+
- Create and organize collections of Elements as building blocks for pages
36+
- Blueprints provide boilerplate full- or partial-page templates
37+
- Multiple dropzones for complete control of every page layout
38+
- Configure content using a variety of controls including toggles, text inputs, date pickers, select inputs, sliders, Resource pickers, and color pickers
39+
- Supports MODX code Snippets with live Ajax rendering of changes
40+
- Visual Font Awesome 5 icon picker—developers can create other icon pickers, too
41+
- Simple content formatting with a curated default TinyMCE rich text editor
42+
- Rearrange and re-order page content via drag-and-drop
43+
- Quickly duplicate existing Elements to build up galleries and sliders
44+
- Fred content renders down to cachable output for blazing-fast page speed
45+
- Complete set of production-ready Bootstrap 4 Elements to slash the time needed for theme builders to get startedThe friendly front-end editor … documentation at https://modxcms.github.io/fred/
46+
47+
## Upgrade Notes
1648
If you are upgrading from a previous release to the following versions, please note the important changes:
1749

18-
------------
19-
-> rc1
20-
------------
21-
Make sure all Themes are named uniquely, and any Elements, Blueprints, Element categories, or Blueprint categories within a Themes likewise have unique names. You can share names across Themes, except for the Theme name itself.
50+
### -> rc1
51+
Make sure all Themes are named uniquely, and any Elements, Blueprints, Element categories, or Blueprint categories within Themes likewise have unique names. You can have duplicate category and Element names across different Themes.
52+
53+
### -> beta7
54+
If you defined Media Sources in Option Sets, in Element markup, or Options Override, you need to adjust these from using the Media Source ID to the Media Source name.
55+
56+
57+
## Folder structure
58+
Fred installs the following into your MODX webroot directory:
59+
60+
- `_build/assets/js` - source code for the front-end
61+
- `_build/assets/sass` - source code for front-end styles
62+
- `assets/components/fred/mgr` - Backend Manager page (“3PC”)
63+
- `assets/components/fred/web` - Assets used in the front-end
64+
- `assets/components/fred/web/endpoints` - XHR endpoints for asyncronous calls
65+
- `core/components/fred/model/fred/src` - Autoloaded directory for the Fred namespace
66+
- `core/components/fred/model/fred/src/Endpoint` - Implementation for the XHR endpoints
67+
68+
## Prerequisites for developing for Fred
69+
- MODX Revolution
70+
- GPM
71+
- Composer
72+
- Yarn
73+
- Ruby Sass
74+
75+
### Developing Fred
76+
First, set up the project inside your MODX webroot:
77+
78+
1. `yarn install` from web root
79+
2. change directories to `core/components/fred/model`
80+
3. `composer install`
81+
4. install fred with GPM
82+
83+
### Build
84+
Set up watchers to update the code for changes:
2285

23-
------------
24-
-> beta7
25-
------------
26-
If you defined a Media Sources in Option Sets, in Element markup, or an Options Override, you need to adjust these from using the Media Source ID to the Media Source name.
86+
1. Start watchers from webroot: `yarn dev`
87+
2. Minify CSS and JS and prepare code for production: `yarn build`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"mousetrap": "^1.6.3",
4646
"nouislider": "^11.1.0",
4747
"promise-cancel": "^2.0.1",
48-
"twig": "^1.15.2"
48+
"twig": "^1.16.0"
4949
}
5050
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5094,10 +5094,10 @@ tty-browserify@0.0.0:
50945094
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
50955095
integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=
50965096

5097-
twig@^1.15.2:
5098-
version "1.15.2"
5099-
resolved "https://registry.yarnpkg.com/twig/-/twig-1.15.2.tgz#8600182f9cf12cfd5f5b365146c5b9914bfa1c10"
5100-
integrity sha512-n7w76E8gzguhcLyKcjlT3sYWGdBTgZY2DO/frcbZ5Fk7LwMRoTathvWMFxZyJ2HYRJ+rEzccw6nu3fsy7ceGGQ==
5097+
twig@^1.16.0:
5098+
version "1.16.0"
5099+
resolved "https://registry.yarnpkg.com/twig/-/twig-1.16.0.tgz#cd42e962e0ee3645226effb831514bab049e8bc9"
5100+
integrity sha512-NYGBERQUEfK5PNQYjeK0XRktksrzgu8b5cU4YEMSrq3rvJ/obnDWLAG4/VyMFgXdS1+IvCfvnvi6aeN6mGZ0dQ==
51015101
dependencies:
51025102
"@babel/runtime" "^7.8.4"
51035103
locutus "^2.0.11"

0 commit comments

Comments
 (0)