Giter Site home page Giter Site logo

antd-init's Introduction

antd-init

NPM version

Ant Design boilerplate generator.


Feature

  • Generate a webpack workflow based boilerplate.
  • support ES2015 and less.
  • Local development via dora, support proxy, HMR and unit test.
  • support custom webpack.config,examples.

More usage: http://ant-tool.github.io/

Install

$ npm i antd-init -g

Usage

Generate boilerplate.

$ mkdir foo && cd foo
$ antd-init

// or with specify type
$ antd-init --type plain-react
$ antd-init --type redux

Start development server.

$ npm start

Build.

$ npm run build

Test.

$ npm test

Lint.

$ npm run lint

Don't work in IE8 ?

Since IE8 is don't supported in main react community, you should do follow steps to make it work:

  1. Open package.json

Modify dependency version.

- "react": "^15.0.2",
- "react-dom": "^15.0.2",
- "react-router": "^2.0.1",
+ "react": "0.14.x",
+ "react-dom": "0.14.x",
+ "react-router": "2.3.x"

Remove hmr plugin.

- "start": "dora -p 8001 --plugins   \"webpack,hmr,proxy,livereload?enableJs=false&injectHost=127.0.0.1,browser-history?index=/src/entries/index.html\"",
+ "start": "dora -p 8001 --plugins   \"webpack,proxy,livereload?enableJs=false&injectHost=127.0.0.1,browser-history?index=/src/entries/index.html\"",
  1. Open webpack.config.js, and enable es3ify-loader
// Enable this if you have to support IE8.
- // webpackConfig.module.loaders.unshift({
- //   test: /\.jsx?$/,
- //   loader: 'es3ify-loader',
- // });
+ webpackConfig.module.loaders.unshift({
+   test: /\.jsx?$/,
+   loader: 'es3ify-loader',
+ });

antd-init's People

Contributors

afc163 avatar benjycui avatar jin5354 avatar leungwensen avatar madlordory avatar nikogu avatar pigcan avatar sorrycc avatar superraytin avatar xiongjiabin avatar yiminghe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.