Skip to content

Commit

Permalink
[changed] Source to ES6 using Babel and Webpack
Browse files Browse the repository at this point in the history
A lot has happened since this projects inception and newer tools are
available that can facilitate a better development environment. This
work gives the project structure a facelift to meet the current trends
of the broader React community.

- Source cleanup
  - Rename all js files to *.js
  - Use [Babel](http://babeljs.io/) for our es6 -> es5 transpilation
  - Update all js to es6 standards
    - src
    - test
    - docs
    - doc examples
    - ie8 visual test
  - [ESLint](http://eslint.org/) all .js files
- Build
  - Use [Webpack](http://webpack.github.io/) - This should provide more
    control on how we build our pre-concatenated and minified releases.
  - Drop Grunt, use npm scripts and shell scripts where needed.
  - Promise based release process (faster)
  - Update README to explain how to run.
- Test
  - Single karma config file
  - Not dependent on building src to disk to run, use
    [karma-webpack](https://github.com/webpack/karma-webpack) which will
    build the src in memory.
  - Better test watcher that re-runs tests when changing src files.
    Current watcher only runs if test files change.
  - Fail on linting errors
  - Pull `es5-shim` from npm
- Docs
  - Pull `bootstrap` from npm
  - Pull `codemirror` from npm
  - Use in browser Babel transformer for doc examples
  - Consolidate package.json deps and scripts to repo root. Leads to
    less confusion on how to run the docs locally.
  - Update README for local setup.
  • Loading branch information
mtscout6 committed Mar 25, 2015
1 parent 7527953 commit 98ee978
Show file tree
Hide file tree
Showing 282 changed files with 4,527 additions and 27,536 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

[*.js]
charset = utf-8
indent_style = space
indent_size = 2

[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
32 changes: 32 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"env": {
"browser": true,
"node": true
},
"ecmaFeatures": {
"jsx": true
},
"parser": "babel-eslint",
"plugins": [
"react"
],
"rules": {
"comma-spacing": 1,
"key-spacing": 0,
"no-underscore-dangle": 0,
"no-unused-vars": [1, { "vars": "all", "args": "none" }],
"no-undef": 1,
"no-var": 2,
"quotes": [1, "single", "avoid-escape"],
"react/display-name": 0,
"react/jsx-uses-react": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-multi-comp": 1,
"react/prop-types": 1,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/wrap-multilines": 1,
"strict": 0
}
}
18 changes: 8 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
*~
node_modules
.DS_Store
npm-debug.log
test_bundle.js
test-built/*
.idea
transpiled/*
docs/*.html
docs/assets/bundle.js
cjs/*
amd/*
node_modules
amd/
!tools/amd/
lib/
!tools/lib/
dist/
!tools/dist/
docs-built/
ie8/bundle.js
lib/*
tmp-bower-repo/
tmp-docs-repo/
15 changes: 0 additions & 15 deletions .jshintrc

This file was deleted.

8 changes: 4 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
node_modules/
docs/
docs-built/
test-built/
test/
tools/
.gitignore
.travis.yml
Gruntfile.js
karma.ci.js
karma.dev.js
test_bundle.js
karma.conf.js
tmp-docs-repo/
tmp-bower-repo/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ sudo: false
language: node_js
node_js:
- "0.10"
- "0.12"
- "iojs"
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,27 @@
We welcome community support with both pull requests and reporting bugs. Please
don't hesitate to jump in.

## Current Issues

Feel free to tackle any currently open
[issue](https://github.com/react-bootstrap/react-bootstrap/issues). The issues
tagged with "help wanted" are especially open.

## Tests

All commits that fix bugs or add features need a test.

## Code Style

Please adhere to the current code styling. We have included an `.editorconfig`
at the repo's root to facilitate uniformity regardless of your editor. See the
[editor config site](http://editorconfig.org/) for integration details.

We use [ESLint](http://eslint.org/) for all JavaScript Linting. There should be
no linting errors and no new warnings for new work. You are welcome to configure
your editor to use ESLint or the `npm test` command will run unit tests and the
linter.

## Commit Subjects for Public API Changes

If your patch **changes the API or fixes a bug** please use one of the following
Expand Down
217 changes: 0 additions & 217 deletions Gruntfile.js

This file was deleted.

19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

[Bootstrap 3](http://getbootstrap.com) components built with [React](http://facebook.github.io/react/)

[![Build Status](https://travis-ci.org/react-bootstrap/react-bootstrap.svg?branch=master)](https://travis-ci.org/react-bootstrap/react-bootstrap) [![NPM version](https://badge.fury.io/js/react-bootstrap.svg)](http://badge.fury.io/js/react-bootstrap) [![Bower version](https://badge.fury.io/bo/react-bootstrap.svg)](http://badge.fury.io/bo/react-bootstrap) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-bootstrap/react-bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/react-bootstrap/react-bootstrap.svg)](https://travis-ci.org/react-bootstrap/react-bootstrap) [![NPM version](https://badge.fury.io/js/react-bootstrap.svg)](http://badge.fury.io/js/react-bootstrap) [![Bower version](https://badge.fury.io/bo/react-bootstrap.svg)](http://badge.fury.io/bo/react-bootstrap) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-bootstrap/react-bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Under active development - APIs will change.

## Docs

A [docs site](http://react-bootstrap.github.io) with live editable examples is a work in progress
See the [documentation](http://react-bootstrap.github.io) with live editable examples.

### Bootstrap Version

Expand All @@ -25,10 +25,15 @@ and many [contributors](https://github.com/react-bootstrap/react-bootstrap/graph

- [react-router-bootstrap](https://github.com/mtscout6/react-router-bootstrap) - Integration with [react-router](https://github.com/rackt/react-router).

## Contributions
## Local Setup

- Install the dependencies with `npm install`
- Run tests `npm test`
- Run tests in watch mode `npm run test-watch`
- Run the docs site in development mode with `npm run docs`. This will watch
for file changes as you work. Simply refresh the page to see the updates.
- Build with `npm run build`

Yes please!
## Contributions

- Run `npm install`, `npm run test-watch` to run tests while you develop (however this hides any build errors, you can see these with `grunt build`)
- Review the [contributing guidelines](https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md)
- See [issues](https://github.com/stevoland/react-bootstrap/issues) for some ideas
Yes please! See the [contributing guidelines](https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md) for details.
Loading

0 comments on commit 98ee978

Please sign in to comment.