Reactify


This project is not covered by Drupal’s security advisory policy.

React & Redux powered theme

INSTALLATION

Install node modules necessary for theme and development by running 'npm i'

Theme uses Webpack for development and build processes.

For development run 'npm run dev' and theme will be available on the address 'https://localhost:8080' with hot reloading enabled.
For building run 'npm run build' with production environment for Babel: 'BABEL_ENV=production npm run build'

Development process might fail to start since in webpack.config.js file by default are plugins for minification and optimization.
In this case please remove this snippet in above mentioned file: 'plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.UglifyJsPlugin({})
],'

This snippet will be needed for production build though.

Reactify uses 'reactify_utilities' module for creation of theme settings, REST endpoints and authentication.

Even though Drupal 8 provides good foundation for REST services, some features still were added. Module can serve as example for building
custom functionality.

THEME STRUCTURE

Compiled React app is located in 'build' folder and is attached as a library in theme info.yml file
App's source code lives in 'src' folder and structured in various folders for further maintainability.

The theme uses Redux for state management and React router for routing.
Theme was designed as single page app, though it excludes paths to '/user*' and '/admin*' sections for accessing Drupal backend.
This is relevant for projects using theme on the same domain as Drupal's backend.

It can be used as well on another domains. In that case it would need only 'build' folder and some .html file for mounting app.
Also, backend's url should be specified in 'src/config.js' file for REST requests to backend. By default there is empty string and,
thus, theme requests endpoints on the same domain.

Reactify has public and protected areas. Protected area is available after signing in on /dashboard* urls.


Reactify项目的Drush安装命令:复制到剪贴板

注:个别模块仍需开启相关子模块。

项目分类:

推荐版本下载:

版本下载地址发布日期发布说明翻译下载
8.x-1.0-alpha2tar.gz (989.4 KB) | zip (1.03 MB)2018年4月16日发布说明简 | 繁 | 更多

开发版本下载:

版本下载地址发布日期发布说明翻译下载
8.x-1.x-devtar.gz (989.41 KB) | zip (1.03 MB)2018年4月16日发布说明简 | 繁 | 更多