Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #144 from FormidableLabs/feature-babel
Browse files Browse the repository at this point in the history
Feature: Add babel compilation on prepublish
  • Loading branch information
alexlande committed May 13, 2015
2 parents 6e37e5c + 3905e8a commit 8993d36
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
_site
npm-debug.log
coverage
lib
5 changes: 2 additions & 3 deletions modules/components/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ var Style = React.createClass({

var styles = this._buildStyles(this.props.rules);

return React.createElement(
'style',
{dangerouslySetInnerHTML: {__html: styles}}
return (
<style dangerouslySetInnerHTML={{__html: styles}} />
);
}
});
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "radium",
"version": "0.11.1",
"description": "A set of tools to manage inline styles on React elements",
"main": "modules/index.js",
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "https://github.com/formidablelabs/radium.git"
Expand All @@ -14,6 +14,7 @@
},
"scripts": {
"dist": "webpack && webpack --config=webpack.config.minified.js",
"lib": "rm -rf ./lib && babel ./modules -d lib && rm -rf ./lib/__tests__ ./lib/__mocks__",
"examples": "webpack-dev-server --config examples/webpack.config.js --no-info --content-base examples/",
"test": "jest",
"lint": "eslint modules"
Expand All @@ -26,10 +27,12 @@
"lodash": "^3.2.0"
},
"devDependencies": {
"babel": "^5.3.1",
"babel-core": "^5.3.1",
"babel-loader": "^5.0.0",
"coveralls": "^2.11.2",
"eslint": "^0.19.0",
"jest-cli": "^0.4.0",
"jsx-loader": "^0.12.2",
"react": ">=0.12.0 <0.14.0",
"react-tools": "^0.13.3",
"webpack": "^1.5.3",
Expand Down
8 changes: 2 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ module.exports = {
module: {
loaders: [
{
test: /\.js$/,
loader: 'jsx-loader?harmony'
},
{
test: /\.jsx$/,
loader: 'jsx-loader?insertPragma=React.DOM&harmony'
test: /\.js(x|)?$/,
loader: 'babel-loader'
}
]
}
Expand Down

0 comments on commit 8993d36

Please sign in to comment.