在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):reapp/reapp开源软件地址(OpenSource Url):https://github.com/reapp/reapp开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):What is it?Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that scaffolds your app and includes a server and build system. InstallationInstallation is done through npm:
Generate a new base reapp stack with:
And finally in your app directory, run it on localhost:3010:
CLIThe CLI has three main functions: creating new apps, running them, and building them for release. Note that when you run your app, it will run in development mode by default which is much slower but easier to debug. Run it in production mode to get a feel for real-world performance. CLI Usage:
The build and run commands take a variety of options to help ease your development, such as:
Running & BuildingUse
If you run into a blank page after
You also have the same flags available to build commands. The
When you run It will also copy your assets for you. Here's an example of running
This allows a lot of flexibility. You can share assets between builds, or have
exclusive ones for a platform. Leave an asset in the base A good case for shared assets is your Cordova config.xml. Leave it in Structure of your applicationsYou can see the exact app that's generated through the reapp-starter repo.
By default The If you place a Your First AppThere are a number of pieces we've included in a reapp. Let's explore a few of them in order of when you'll encounter them in your codebase. Think of this as a tour of a reapp app, giving an introduction to packages as we encounter them. You can check out the reapp project on Github for more info. You also have an entry point defined as ./app/app.jsLoad all your stuff. From theme to store to actions. Then, you run your routes,
which are done using reapp-routes. This simplifies routing down to the bare minimum.
Note that your routes will automatically look into An example: routes(require,
route('home', '/', route('sub')))
// ./components/Home.jsx
// ./components/home/Sub.jsx This is the reapp-routes syntax. The key to note here is the reapp-ui UI Kit)./app/theme (The next theme we require is the For more documentation on themes, read here. ./app/components/Home.jsxThis is the first React component in your structure, as defined in your routes.
Notice when we export it, we wrap it with More readingCustom buildsReapp-pack takes in an object that lets you configure your builds. It provides you with default config files, but you can override them if you need custom Webpack loaders. The build system generates your Webpack config using reapp-pack.
Place a config in your Here's an example config: module.exports = {
entry: './app/app.js',
devtool: 'none',
target: 'web',
env: 'production',
linkModules: true,
debug: true,
separateStylesheet: true,
minify: true
}; You can also provide the following options that are passed to Webpack:
Why Reapp?Reapp wasn't built purposefully to be a framework. Instead, it started as a UI kit. From that kit, two apps were built. While this isn't a lot, it was enough to see repetition between the two that could be extracted. From those two apps, over a period of months, we extracted a set of packages, ensuring to keep each of them completely independent. It was an experiment in seeing if a framework was necessary. What we found was this: if you can subscribe to a certain file structure, you can avoid the framework. With that file structure, we can provide helpers via a CLI. Bootstrap your app in one command and you have a mature build system built in, without having to do anything. Really, Reapp is simple. You could even just use the UI kit and roll your own app. We just went through that headache, and decided to make it easier to avoid it if you like how we make apps. Example AppsWe have two example apps you can check the source to: Development EnvironmentSublime users, here's a guide for getting syntax highlighting, snippets and linting that works with babel. Other reapp packages
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论