Comparing version 1.0.0 to 1.0.1
@@ -6,4 +6,8 @@ # Changelog | ||
### 1.0.1 (2017-06-11) | ||
Fix a bug with webpack resolving `pkg.modules`, so from now own `theming` has commonjs (`dist/cjs`) and es modules (`dist/esm`) entry poingts. | ||
### 1.0.0 (2017-06-09) | ||
Initial release with `channel`, `ThemeProvider`, `withTheme` and `createTheming` |
{ | ||
"name": "theming", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Unified CSSinJS theming solution for React", | ||
"main": "dist", | ||
"main": "dist/cjs", | ||
"module": "dist/esm", | ||
"files": [ | ||
@@ -11,11 +12,16 @@ "src", | ||
"scripts": { | ||
"build": "babel src -d dist --ignore '*test*'", | ||
"watch": "babel src -d dist --watch", | ||
"lint": "eslint .", | ||
"test": "ava", | ||
"tdd": "ava --watch", | ||
"coverage": "nyc ava", | ||
"test": "cross-env BABEL_ENV=cjs ava", | ||
"tdd": "npm run test -- --watch", | ||
"coverage": "cross-env BABEL_ENV=cjs nyc ava", | ||
"coveralls": "run-s coveralls:*", | ||
"coveralls:gather": "npm run coverage", | ||
"coveralls:upload": "coveralls < coverage/lcov.info" | ||
"coveralls:upload": "coveralls < coverage/lcov.info", | ||
"clean": "rimraf dist", | ||
"build": "run-s clean babel:*", | ||
"babel:cjs": "cross-env BABEL_ENV=cjs babel src -d dist/cjs --ignore '*test*'", | ||
"babel:esm": "cross-env BABEL_ENV=esm babel src -d dist/esm --ignore '*test*'", | ||
"watch": "npm-run-all clean -p babel:watch:*", | ||
"babel:watch:cjs": "npm run babel:cjs -- --watch", | ||
"babel:watch:esm": "npm run babel:esm -- --watch" | ||
}, | ||
@@ -75,2 +81,3 @@ "ava": { | ||
"coveralls": "^2.13.1", | ||
"cross-env": "^5.0.1", | ||
"enzyme": "^2.8.2", | ||
@@ -85,3 +92,4 @@ "eslint": "^3.19.0", | ||
"react-dom": "^15.5.4", | ||
"react-test-renderer": "^15.5.4" | ||
"react-test-renderer": "^15.5.4", | ||
"rimraf": "^2.6.1" | ||
}, | ||
@@ -88,0 +96,0 @@ "dependencies": { |
@@ -1,1 +0,1 @@ | ||
module.exports = '__THEMING__'; | ||
export default '__THEMING__'; |
@@ -1,7 +0,7 @@ | ||
const React = require('react'); | ||
const PropTypes = require('prop-types'); | ||
const isFunction = require('is-function'); | ||
const isPlainObject = require('is-plain-object'); | ||
const channel = require('./channel'); | ||
const createBroadcast = require('brcast'); | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import isFunction from 'is-function'; | ||
import isPlainObject from 'is-plain-object'; | ||
import channel from './channel'; | ||
import createBroadcast from 'brcast'; | ||
@@ -14,3 +14,3 @@ /** | ||
function createThemeProvider(CHANNEL = channel) { | ||
export default function createThemeProvider(CHANNEL = channel) { | ||
return class ThemeProvider extends React.Component { | ||
@@ -97,3 +97,1 @@ static propTypes = { | ||
} | ||
module.exports = createThemeProvider; |
@@ -1,4 +0,4 @@ | ||
const React = require('react'); | ||
const PropTypes = require('prop-types'); | ||
const channel = require('./channel'); | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import channel from './channel'; | ||
@@ -8,3 +8,3 @@ const getDisplayName = Component => | ||
function createWithTheme(CHANNEL = channel) { | ||
export default function createWithTheme(CHANNEL = channel) { | ||
return Component => | ||
@@ -49,3 +49,1 @@ class WithTheme extends React.Component { | ||
} | ||
module.exports = createWithTheme; |
@@ -1,14 +0,21 @@ | ||
const createThemeProvider = require('./create-theme-provider'); | ||
const createWithTheme = require('./create-with-theme'); | ||
const channel = require('./channel'); | ||
import createThemeProvider from './create-theme-provider'; | ||
import createWithTheme from './create-with-theme'; | ||
import defaultChannel from './channel'; | ||
module.exports = { | ||
channel, | ||
withTheme: createWithTheme(), | ||
ThemeProvider: createThemeProvider(), | ||
createTheming: (customChannel = channel) => ({ | ||
export const channel = defaultChannel; | ||
export const withTheme = createWithTheme(); | ||
export const ThemeProvider = createThemeProvider(); | ||
export function createTheming(customChannel = defaultChannel) { | ||
return { | ||
channel: customChannel, | ||
withTheme: createWithTheme(customChannel), | ||
ThemeProvider: createThemeProvider(customChannel), | ||
}), | ||
}; | ||
} | ||
export default { | ||
channel: defaultChannel, | ||
withTheme, | ||
ThemeProvider, | ||
createTheming, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
59029
22
1157