React Application Manager: 创建和运行React应用程序 - 不需要命令行或构建设置

网友投稿 736 2022-10-31

React Application Manager: 创建和运行React应用程序 - 不需要命令行或构建设置

React Application Manager: 创建和运行React应用程序 - 不需要命令行或构建设置

RAM: React App Manager

BETA

Create and run React applications – no command line or build setup required. Powered by Electron & Create React App

Getting started

RAM requires Node.js v6 and npm v5.2 or later to be installed on your computer. Install the latest version of Node.js (which includes npm) here:

Install Node.js

Download for MacOS:

Download

RAM includes support for the following app types:

Create React AppNext.jsGatsbyRazzleVue.jsPreact

To add support for another app, please open a pull request.

Motivation

I'm a firm believer in code literacy, and I've worked with many people throughout my career who have strong development skills with languages like HTML and CSS, but who might face barriers to entry with modern front-end development tools. When I think about the potential barriers to entry, a few things come to mind:

Scaffolding a full React (or similar) application requires a bit of setupThe terminal and command line interfaces can be intimidating at firstNode.js and npm can be foreign concepts to people new to front-end development

For the most part, Create React App has solved #1 for people who already know #2 and #3. It's an excellent tool and that's why RAM makes use of it.

RAM is aimed at abstracting away the terminal and npm aspects for beginners. If you're a professional front-end developer, I'd recommend using the command line tools directly instead of an application like this, as it's a very valuable and powerful skillset to utilize. If you do make use of this app, hopefully it can serve as a learning tool and can make some of these things less intimidating as you progress.

Remember: GUIs will never be as efficient or powerful as CLIs

How it works

All the magic comes from the underlying command line interfaces: npm and create-react-app. This application uses Electron to spawn child processes that run the commands to power these tools. The logs from stdio are passed back to the application for display. See the renderer/spawn.js and renderer/CreateForm.js modules for an example of how this works.

Alternative approaches

Some alternatives to this particular Electron setup include:

Server running directly in electronUsing zeit/pkg with a web interface

Caveats

Requires Node.js v6+ and npm v5.2+Built in a few hoursNo testsNot tested on Linux or Windows

Alternatives

Compositor Iso is a similar project aimed at solving a similar problemUse Create React App directlyCodeSandbox is great for quick prototypes and demos with shareable URLsGuppy project by Josh Comeau

Roadmap

Abstract create form to a more general purpose utility npm depencendy management

Contributing

Fork itCreate your feature branch (git checkout -b my-new-feature)Commit your changes (git commit -am 'Add some feature')Push to the branch (git push origin my-new-feature)Create new Pull Request

Development

Install dependencies and start the app:

npm i && npm start

The main folder contains modules for the main process, and renderer includes all files for the renderer process. No Babel transpilation is used, so be sure to use Electron-compatible modules and syntax.

MIT License

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:使用@Order控制配置类/AOP/方法/字段的加载顺序详解
下一篇:MyBatis从入门到精通—MyBatis的Dao实现和配置文件深入
相关文章

 发表评论

暂时没有评论,来抢沙发吧~