在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:element-react开源软件地址:https://gitee.com/mirrors/element-react开源软件介绍:Element ReactElement was initially written in Vue, which has many elegant UI components, but we also love React, so we forked it for the React community. Getting StartedInstallnpm install element-react --save Before the building, you need a style theme, here we recommend you to pick up npm install element-theme-default --save UsageWe are die hard fans of ECMAScript 6, so we recommend you writing code in modern javascript. import { Button } from 'element-react'; Also we provide an advanced way to tree shaking the code with Rollup.js and Webpack 2 import { Button } from 'element-react/next'; ConfigWith webpack, you need additional loaders to build with const webpack = require('webpack');module.exports = { entry: { src: 'path/to/src' }, output: { path: 'path/to/output' publicPath: '/public', chunkFilename: '[chunkhash:12].js', filename: '[chunkhash:12].js' }, plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }), new webpack.optimize.UglifyJsPlugin({ output: { comments: false } }) ], resolve: { extensions: ['.js', '.jsx'] }, module: { loaders: [ { test: /\.jsx?$/, loader: 'babel-loader', include: ['path/to/src'] }, { test: /\.css$/, loaders: ['style-loader', 'css-loader'] }, { test: /\.(ttf|eot|svg|woff|woff2)(\?.+)?$/, loader: 'file-loader?name=[hash:12].[ext]' } ] }} ContributingPlease make sure to read the Contributing Guide before making a pull request. Acknowledgments
Credits
LicenseMIT |
请发表评论