├── .gitattributes ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .husky └── pre-commit ├── .npmignore ├── .prettierignore ├── .prettierrc.json ├── .vscode └── settings.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin └── remake ├── index.js ├── package-lock.json ├── package.json └── utils ├── commands.js ├── dot-remake.js ├── helpers.js ├── inquirer-questions.js └── messages.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [remake] 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Logs 4 | logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # Bower dependency directory (https://bower.io/) 29 | bower_components 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (https://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directories 38 | node_modules/ 39 | jspm_packages/ 40 | 41 | # TypeScript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # Yarn Integrity file 57 | .yarn-integrity 58 | 59 | # dotenv environment variables file 60 | .env 61 | 62 | # parcel-bundler cache (https://parceljs.org/) 63 | .cache 64 | 65 | # next.js build output 66 | .next 67 | 68 | # nuxt.js build output 69 | .nuxt 70 | 71 | # vuepress build output 72 | .vuepress/dist 73 | 74 | # Serverless directories 75 | .serverless 76 | 77 | # FuseBox cache 78 | .fusebox/ 79 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run prettier-check -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .gitattributes 3 | /docs -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # MD files 4 | *.md 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # Optional npm cache directory 48 | .npm 49 | 50 | # Optional eslint cache 51 | .eslintcache 52 | 53 | # Optional REPL history 54 | .node_repl_history 55 | 56 | # Output of 'npm pack' 57 | *.tgz 58 | 59 | # Yarn Integrity file 60 | .yarn-integrity 61 | 62 | # dotenv environment variables file 63 | .env 64 | 65 | # parcel-bundler cache (https://parceljs.org/) 66 | .cache 67 | 68 | # next.js build output 69 | .next 70 | 71 | # nuxt.js build output 72 | .nuxt 73 | 74 | # vuepress build output 75 | .vuepress/dist 76 | 77 | # Serverless directories 78 | .serverless 79 | 80 | # FuseBox cache 81 | .fusebox/ 82 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 2.6.0 (December 30, 2022) 2 | 3 | - Allowing multiple Remake apps to run on localhost at the same time 4 | - FIXED: randomly being logged out from a Remake app because session not destroyed 5 | - Allow passing in sortableOptions when initializing Remake 6 | - Update `esbuild` so it works on m1 macs 7 | - FIXED: Don't save twice. Removed save when syncing data into page, since setting keys saves anyways 8 | 9 | 10 | # 2.5.8 (October 4, 2021) 11 | 12 | - Made [main README](https://github.com/remake/remake-framework/blob/master/README.md) simpler & easier to read 13 | - Update all NPM packages to secure versions after running `npm audit` (for both the CLI and the framework) 14 | - Bug fixes 15 | - Fixed unresolved passport callbacks 16 | - Prevent live.js from reloading the page when new data is saved 17 | - Not setting NODE_ENV to "development" mode by default 18 | 19 | # 2.5.7 (October 2, 2021) 20 | 21 | - Update to Remake's CLI: when updating the framework, also update package.json (fields: "ava", "scripts", "nodemonConfig", "husky", "dependencies", "devDependencies" 22 | - live reload with live.js (much better than the old way) 23 | - add live.js (live reload) script to Remake 24 | - prevent logging requests from live.js 25 | - remove old, slow auto-reload code 26 | - prevent nodemon from reload the server on html/css changes 27 | - make nodemon ignore entire app/ directory 28 | 29 | # 2.4.7 (June 26, 2021) 30 | 31 | - Update to Remake's CLI: show error for registerUser client-side if there is one 32 | 33 | # 2.4.6 (June 10, 2021) 34 | 35 | - If the current port is in use, make the Remake server choose a new one at random 36 | - Add Remake's first 3 tests! 37 | - Make it so Remake's client-side code can run inside Node.js 38 | - Expand the element properties (e.g. `autofocus`, `contentEditable`) that can be gotten and set from an element using Remake 39 | 40 | # 2.4.5 (June 10, 2021) 41 | 42 | - Provide a `{{cacheBustString}}` variable so dev can easily break CSS and JS from browser cache 43 | - To read more about cache busting: https://css-tricks.com/strategies-for-cache-busting-css/ 44 | - Allow `Remake.init()` to be called more than once on a page 45 | - Useful for the Remake client-side demo: https://codepen.io/panphora/pen/rNMVYZz 46 | - Pass `triggerEditOnElem` to `_defaultAddItemCallback` when it's overwritten, so user can trigger the edit popover when a new item has been added to the page 47 | - Fixed bug: Not able to import `lodash-es` or `deepdash-es` 48 | 49 | # 2.4.1 (May 7, 2021) 50 | 51 | - The Remake CLI will now install missing npm packages after the user updates the framework using `remake update-framework` 52 | 53 | # 2.4.0 (May 4, 2021) 54 | 55 | - Generate unique ids for new items automatically 🧙♂️ 56 | - Added an attribute argument `:edit` for the `new:` attribute (e.g. use like this: `new:example-item:edit`). It automatically triggers an edit popover when a new item is created! 57 | - Fixed bug: Remake wasn't nesting data that's grabbed from the DOM in a consistent way 58 | - Added Prettier and formatted all code to look nicer 59 | - Getting DOM data with `getSaveData()` now works server-side 60 | 61 | # 2.3.3 (January 15, 2021) 62 | 63 | - Don't allow Remake to be initialized more than once 64 | 65 | # 2.3.2 (November 28, 2020) 66 | 67 | - Fixed bug on Windows causing the `remake create` command to not work ([See the fix](https://stackoverflow.com/a/16951241/87432)) 68 | 69 | # 2.3.1 (November 23, 2020) 70 | 71 | - Added support for generating two more starter apps: 72 | - Resume/CV builder 73 | - Reading list sharer app 74 | 75 | # 2.2.0 (November 20, 2020) 76 | 77 | - **BIG CHANGE:** Generating unique ids for every object is now turned off by default. These ids were confusing and unhelpful to a lot of people. Remake will always support unique ids, however. Until we come up with a more elegant solution, you can turn them back on by editing your `.remake` file and adding the line: `"generateUniqueIds": true` 78 | - Added new handlebars helper `checked` to set the `checked` attribute of a `` element. You pass in a value and it generates a `checked="checked"` attribute if the value is truthy. Use it like this: `{{{checked todo.done}}}`. 79 | - Added new `run:watch` attribute. When it's attached to an element with `watch:` attributes, those watch attributes will be triggered as soon as the page loads 80 | - Added new `prevent-default` attribute for preventing a DOM element's default behavior 81 | - Added `onRemoveItem()` callback 82 | - Changed the values that the `toggle` attribute and `` element toggle between. Now it's "true" and "false" instead of "on" and "off". 83 | - Added some default watch functions that you can use to handle computations and set data: 84 | - `setMailToLink`: for setting an `href` attribute to a `mailto:` email link 85 | - `setLink`: for setting an `href` attribute to a valid link that has `"https://"` prepended 86 | - `countKeys`: counts the number of keys that match the current key, filters out any with falsey values, and uses the passed in `selector` element to update another element with this count 87 | - `sumKeyValues`: sums the number values of keys that match the current key and uses the passed in `selector` element to update another element with this sum 88 | - FIX BUG: deleting all the content from a user's `user-app-data` json file won't stall the app. The data will just default to an empty object. 89 | 90 | # 2.1.2 (November 18, 2020) 91 | 92 | - Remake has support for custom domains! 🎉 93 | - Added `remake custom-domain` command 94 | - Fixed bug: `callWatchFunctionsOnElements()` wasn't working 95 | - Fixed bug: allow `edit:` attribute to get last to args in any order 96 | - Fixed minor issue with CLI message text 97 | - Updated README 98 | 99 | # 2.0.3 (November 16, 2020) 100 | 101 | - Fix `remake-build` internal build process to use correct source mapping url for "remake.min.js" script 102 | 103 | # 2.0.2 (November 11, 2020) 104 | 105 | - Remove 10 unused NPM packages 106 | - Update 2 outdated NPM packages 107 | - Fix bug: You can now use #for loops in partial templates (oops!) 108 | - Simplified signature of `Remake.callSaveFunction()` so you can just pass in an HTML element instead of an object 109 | 110 | # 2.0.1 (November 8, 2020) 111 | 112 | - Major update to README 113 | - Multi-tenant fixes: uploading and saving data to correct directories 114 | 115 | # 2.0.0 (November 7, 2020) 🚀 116 | 117 | - Brand new syntax: https://recipes.remaketheweb.com/ 118 | - Brand new, much simpler directory structure 119 | - [Read the migration guide](https://docs.google.com/document/d/1dXM7cgyg0W5M7im2RfexSsX9Gn6EfAbtY-kTp__H3A4/edit?usp=sharing) 120 | 121 | # 1.11.2 (August 9, 2020) 122 | 123 | - Deprecated old repositories (https://github.com/panphora/remake & https://github.com/panphora/remake-framework) and switched them to the new official "remake" organization (https://github.com/remake/remake & https://github.com/remake/remake-framework) 124 | - Moved the documentation website outside the CLI repository (https://github.com/remake/remake-docs) 125 | 126 | # 1.11.0 (July 6, 2020) 127 | 128 | - Breaking change: Renamed `username.hbs` to `app-index.hbs` (so it's clearer that it's supposed to be the dynamic home page of the app) 129 | 130 | * Added ability to include an `{{else}}` clause in a `{{for}}` loop for when there are no items to iterate over 131 | * Small change: Made adding a layout to a page have more forgiving syntax (no longer requires spaces between braces) 132 | * Added an empty Remake app to `/_remake/empty-project` so users can get started more quickly with their own projects 133 | * Added better README files to every directory of both the starter Remake app and the blank Remake app 🤩 134 | 135 | # 1.10.1 (June 24, 2020) 136 | 137 | - Massively improved the onboarding for new users by adding README files to each directory of the Remake starter app 138 | - Added a nice getting started message showing users where to access the app after it starts up 139 | - Updated npm dependencies to get rid of console warnings: both `caniuse-lite` and `shelljs` were causing issues 140 | - Breaking change: Renamed the `asset-bundler/` directory to `_remake-asset-bundler` to differentiate it from files that are modifiable by the user 141 | - Fixed: The `remake backup` command now works for file uploads 142 | 143 | _Important:_ If you're updating from an older version of Remake using the `remake update-framework` command, do this: 144 | 145 | 1. Run `remake update-framework` 146 | 2. Make sure all the dependencies from `https://github.com/remake/remake-framework/blob/master/package.json` are in your own `package.json` 147 | 3. Rename the `asset-bundler` directory to `_remake-asset-bundler` 148 | 149 | You may also need to run `npm rebuild` if you get an error like `"Error: Could not locate the bindings file."`. 150 | 151 | Sorry about this. It'll be easier to update in the future. 152 | 153 | # 1.10.0 (April 15, 2020) 154 | 155 | - Implemented file upload, which only requires a few lines of code to get working! (max file size 50MB by default) 156 | 157 | ``` 158 |