Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,7 @@
{
"presets": ["es2015", "stage-0"],
"plugins": [
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}

View File

@@ -0,0 +1,4 @@
{
"parser": "babel-eslint",
"extends": "eslint-config-jss"
}

View File

@@ -0,0 +1,4 @@
src
bench
coverage
tmp

View File

@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2014-present Oleg Slobodskoi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,54 @@
## 5.0.0 / 2017-06-20
- Support jss 8
## 4.0.0 / 2017-04-10
- Support jss 7.0
## 3.0.0 / 2016-12-09
- remove dep to named option
## 2.0.2 / 2016-11-05
- migrate tests, update deps
## 2.0.1 / 2016-10-26
- Support fallbacks
## 2.0.0 / 2016-08-01
- Update dependencies, update to jss 5
## 1.1.0 / 2015-04-14
- Support font-face rule style as an array.
## 1.0.2 / 2015-03-24
- update babel
## 1.0.1 / 2015-01-26
- update deps
## 1.0.0 / 2015-10-19
- support jss 3.0
- now plugin needs to be called like a middleware
## 0.2.0 / 2015-09-21
- migrate to es6
- move examples to jss-examples repository
- simplify packaging
## 0.1.1 / 2015-02-1
- remove unneeded regexp
## 0.1.0 / 2015-01-31
- first release

View File

@@ -0,0 +1,118 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["jssCamelCase"] = factory();
else
root["jssCamelCase"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = camelCase;
var regExp = /([A-Z])/g;
/**
* Replace a string passed from String#replace.
* @param {String} str
* @return {String}
*/
function replace(str) {
return "-" + str.toLowerCase();
}
/**
* Convert camel cased property names to dash separated.
*
* @param {Object} style
* @return {Object}
*/
function convertCase(style) {
var converted = {};
for (var prop in style) {
converted[prop.replace(regExp, replace)] = style[prop];
}
if (style.fallbacks) {
if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);
}
return converted;
}
/**
* Allow camel cased property names by converting them back to dasherized.
*
* @param {Rule} rule
*/
function camelCase() {
function onProcessStyle(style) {
if (Array.isArray(style)) {
// Handle rules like @font-face, which can have multiple styles in an array
for (var index = 0; index < style.length; index++) {
style[index] = convertCase(style[index]);
}
return style;
}
return convertCase(style);
}
return { onProcessStyle: onProcessStyle };
}
/***/ })
/******/ ])
});
;

View File

@@ -0,0 +1 @@
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.jssCamelCase=r():e.jssCamelCase=r()}(this,function(){return function(e){function r(o){if(t[o])return t[o].exports;var n=t[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r){"use strict";function t(e){return"-"+e.toLowerCase()}function o(e){var r={};for(var n in e)r[n.replace(a,t)]=e[n];return e.fallbacks&&(Array.isArray(e.fallbacks)?r.fallbacks=e.fallbacks.map(o):r.fallbacks=o(e.fallbacks)),r}function n(){function e(e){if(Array.isArray(e)){for(var r=0;r<e.length;r++)e[r]=o(e[r]);return e}return o(e)}return{onProcessStyle:e}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var a=/([A-Z])/g}])});

View File

@@ -0,0 +1,24 @@
const webpackConfig = require('./webpack.config')
module.exports = (config) => {
config.set({
browsers: ['Chrome'],
frameworks: ['mocha'],
files: ['tests.webpack.js'],
preprocessors: {
'tests.webpack.js': ['webpack', 'sourcemap']
},
webpack: Object.assign(webpackConfig, {
devtool: 'inline-source-map'
}),
webpackServer: {
noInfo: true
},
reporters: ['mocha', 'coverage'],
coverageReporter: {
dir: 'coverage',
file: 'coverage.json',
type: 'json'
}
})
}

View File

@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = camelCase;
var regExp = /([A-Z])/g;
/**
* Replace a string passed from String#replace.
* @param {String} str
* @return {String}
*/
function replace(str) {
return "-" + str.toLowerCase();
}
/**
* Convert camel cased property names to dash separated.
*
* @param {Object} style
* @return {Object}
*/
function convertCase(style) {
var converted = {};
for (var prop in style) {
converted[prop.replace(regExp, replace)] = style[prop];
}
if (style.fallbacks) {
if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);
}
return converted;
}
/**
* Allow camel cased property names by converting them back to dasherized.
*
* @param {Rule} rule
*/
function camelCase() {
function onProcessStyle(style) {
if (Array.isArray(style)) {
// Handle rules like @font-face, which can have multiple styles in an array
for (var index = 0; index < style.length; index++) {
style[index] = convertCase(style[index]);
}
return style;
}
return convertCase(style);
}
return { onProcessStyle: onProcessStyle };
}

View File

@@ -0,0 +1,147 @@
'use strict';
var _templateObject = _taggedTemplateLiteral(['\n .a-id {\n font-size: 12;\n }\n '], ['\n .a-id {\n font-size: 12;\n }\n ']);
var _expect = require('expect.js');
var _expect2 = _interopRequireDefault(_expect);
var _commonTags = require('common-tags');
var _jss = require('jss');
var _index = require('./index');
var _index2 = _interopRequireDefault(_index);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var settings = {
createGenerateClassName: function createGenerateClassName() {
return function (rule) {
return rule.key + '-id';
};
}
};
describe('jss-camel-case', function () {
var jss = void 0;
beforeEach(function () {
jss = (0, _jss.create)(settings).use((0, _index2['default'])());
});
describe('regular rule', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
a: {
fontSize: '20px',
zIndex: 1,
lineHeight: 1.2
}
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('.a-id {\n font-size: 20px;\n z-index: 1;\n line-height: 1.2;\n}');
});
});
describe('@font-face with array of styles', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': [{
fontFamily: 'Lato-Light',
src: 'url("/fonts/Lato-Light.ttf") format("truetype")'
}, {
fontFamily: 'Lato-Bold',
src: 'url("/fonts/Lato-Bold.ttf") format("truetype")'
}]
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: Lato-Light;\n' + ' src: url("/fonts/Lato-Light.ttf") format("truetype");\n' + '}\n' + '@font-face {\n' + ' font-family: Lato-Bold;\n' + ' src: url("/fonts/Lato-Bold.ttf") format("truetype");\n' + '}');
});
});
describe('fallbacks object', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': {
fontFamily: 'MyWebFont',
fallbacks: {
fontFamily: 'MyWebFontFallback'
}
}
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: MyWebFontFallback;\n' + ' font-family: MyWebFont;\n' + '}');
});
});
describe('fallbacks array', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': {
fontFamily: 'MyWebFont',
fallbacks: [{ fontFamily: 'MyWebFontFallback' }]
}
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: MyWebFontFallback;\n' + ' font-family: MyWebFont;\n' + '}');
});
});
describe('font faces with fallbacks', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': [{
fontFamily: 'MyWebFont',
fallbacks: {
fontFamily: 'MyWebFontFallback'
}
}]
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: MyWebFontFallback;\n' + ' font-family: MyWebFont;\n' + '}');
});
});
describe('function values', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
a: {
fontSize: function fontSize() {
return 12;
}
}
});
});
it('should generate correct CSS', function () {
sheet.update();
(0, _expect2['default'])(sheet.toString()).to.be((0, _commonTags.stripIndent)(_templateObject));
});
});
});

View File

@@ -0,0 +1,119 @@
{
"_args": [
[
"jss-camel-case@5.0.0",
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project"
]
],
"_from": "jss-camel-case@5.0.0",
"_id": "jss-camel-case@5.0.0",
"_inBundle": false,
"_integrity": "sha512-vz11ip5EIlGuevtlUo9xIgiuD+it4Ebbb0+Y4o0A4oA8eOWY4aY7ihi/L7WvkQ54xnGOjUvLZ6nm2VYch2ufYg==",
"_location": "/material-ui/jss-camel-case",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "jss-camel-case@5.0.0",
"name": "jss-camel-case",
"escapedName": "jss-camel-case",
"rawSpec": "5.0.0",
"saveSpec": null,
"fetchSpec": "5.0.0"
},
"_requiredBy": [
"/material-ui/jss-preset-default"
],
"_resolved": "https://registry.npmjs.org/jss-camel-case/-/jss-camel-case-5.0.0.tgz",
"_spec": "5.0.0",
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project",
"author": {
"name": "Oleg Slobodskoi",
"email": "oleg008@gmail.com"
},
"bugs": {
"url": "https://github.com/cssinjs/jss-camel-case/issues"
},
"description": "JSS plugin that allows to write camel cased rule properties",
"devDependencies": {
"babel-cli": "^6.5.1",
"babel-core": "^6.5.1",
"babel-eslint": "^7.1.0",
"babel-loader": "^6.2.4",
"babel-plugin-transform-es3-member-expression-literals": "^6.8.0",
"babel-plugin-transform-es3-property-literals": "^6.8.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-0": "^6.5.0",
"common-tags": "^1.4.0",
"cross-env": "^3.1.3",
"es5-shim": "^4.5.9",
"eslint": "^3.9.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-config-jss": "^2.4.0",
"eslint-plugin-import": "^2.1.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.5.0",
"expect.js": "^0.3.1",
"jss": "^8.0.0",
"karma": "^1.1.1",
"karma-benchmark": "^0.6.0",
"karma-benchmark-reporter": "^0.1.1",
"karma-browserstack-launcher": "^1.0.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.1.1",
"karma-mocha-reporter": "^2.2.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"lint-staged": "^3.0.3",
"mocha": "^3.0.2",
"pre-commit": "^1.1.3",
"rimraf": "^2.5.4",
"webpack": "^1.13.1"
},
"engines": {},
"homepage": "https://github.com/cssinjs/jss-camel-case#readme",
"keywords": [
"cssinjs",
"css-in-js",
"css in js",
"jss",
"plugin",
"camel case"
],
"license": "MIT",
"lint-staged": {
"./src/*.js": [
"eslint",
"git add"
]
},
"main": "lib/index.js",
"name": "jss-camel-case",
"peerDependencies": {
"jss": "^8.0.0"
},
"pre-commit": "lint:staged",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/cssinjs/jss-camel-case.git"
},
"scripts": {
"all": "npm run lint && npm run test && npm run build",
"build": "npm run clean && npm run build:lib && npm run build:tests && npm run build:dist",
"build:dist": "npm run build:dist:max && npm run build:dist:min",
"build:dist:max": "cross-env NODE_ENV=development webpack src/index.js dist/jss-camel-case.js",
"build:dist:min": "cross-env NODE_ENV=production webpack src/index.js dist/jss-camel-case.min.js",
"build:lib": "babel src --out-dir lib",
"build:tests": "npm run build:tests:lib && npm run build:tests:local",
"build:tests:lib": "cross-env NODE_ENV=test babel src --out-dir tests",
"build:tests:local": "cross-env NODE_ENV=test webpack src/index.test.js tmp/tests.js",
"clean": "rimraf {lib,dist,tests,tmp}/*",
"lint": "eslint ./src",
"lint:staged": "lint-staged",
"prepublish": "npm run all",
"test": "cross-env NODE_ENV=test karma start --single-run ",
"test:watch": "cross-env NODE_ENV=test karma start"
},
"version": "5.0.0"
}

View File

@@ -0,0 +1,48 @@
# JSS plugin that allows to write camel cased rule properties
[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/cssinjs/lobby)
Internally it converts everything back to dash separated names.
Make sure you read [how to use
plugins](https://github.com/cssinjs/jss/blob/master/docs/setup.md#setup-with-plugins)
in general.
## Example
```javascript
const styles = {
container: {
fontSize: '20px',
zIndex: 1,
lineHeight: 1.2
}
}
```
```css
.container-a24234 {
font-size: 20px;
z-index: 1;
line-height: 1.2;
}
```
## Demo
[Simple](http://cssinjs.github.io/examples/plugins/jss-camel-case/simple/index.html)
## Issues
File a bug against [cssinjs/jss prefixed with \[jss-camel-case\]](https://github.com/cssinjs/jss/issues/new?title=[jss-camel-case]%20).
## Run tests
```bash
npm i
npm run test
```
## License
MIT

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>JSS Tests</title>
<link href="./node_modules/mocha/mocha.css" rel="stylesheet" />
</head>
<body>
<div id="mocha"></div>
<script src="./node_modules/es5-shim/es5-shim.js"></script>
<script src="./node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd')</script>
<script src="tmp/tests.js"></script>
<script>
mocha.checkLeaks();
mocha.run();
</script>
</body>
</html>

View File

@@ -0,0 +1,2 @@
var context = require.context('./src', true, /\.test\.js$/)
context.keys().forEach(context)

View File

@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = camelCase;
var regExp = /([A-Z])/g;
/**
* Replace a string passed from String#replace.
* @param {String} str
* @return {String}
*/
function replace(str) {
return "-" + str.toLowerCase();
}
/**
* Convert camel cased property names to dash separated.
*
* @param {Object} style
* @return {Object}
*/
function convertCase(style) {
var converted = {};
for (var prop in style) {
converted[prop.replace(regExp, replace)] = style[prop];
}
if (style.fallbacks) {
if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);
}
return converted;
}
/**
* Allow camel cased property names by converting them back to dasherized.
*
* @param {Rule} rule
*/
function camelCase() {
function onProcessStyle(style) {
if (Array.isArray(style)) {
// Handle rules like @font-face, which can have multiple styles in an array
for (var index = 0; index < style.length; index++) {
style[index] = convertCase(style[index]);
}
return style;
}
return convertCase(style);
}
return { onProcessStyle: onProcessStyle };
}

View File

@@ -0,0 +1,147 @@
'use strict';
var _templateObject = _taggedTemplateLiteral(['\n .a-id {\n font-size: 12;\n }\n '], ['\n .a-id {\n font-size: 12;\n }\n ']);
var _expect = require('expect.js');
var _expect2 = _interopRequireDefault(_expect);
var _commonTags = require('common-tags');
var _jss = require('jss');
var _index = require('./index');
var _index2 = _interopRequireDefault(_index);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var settings = {
createGenerateClassName: function createGenerateClassName() {
return function (rule) {
return rule.key + '-id';
};
}
};
describe('jss-camel-case', function () {
var jss = void 0;
beforeEach(function () {
jss = (0, _jss.create)(settings).use((0, _index2['default'])());
});
describe('regular rule', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
a: {
fontSize: '20px',
zIndex: 1,
lineHeight: 1.2
}
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('.a-id {\n font-size: 20px;\n z-index: 1;\n line-height: 1.2;\n}');
});
});
describe('@font-face with array of styles', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': [{
fontFamily: 'Lato-Light',
src: 'url("/fonts/Lato-Light.ttf") format("truetype")'
}, {
fontFamily: 'Lato-Bold',
src: 'url("/fonts/Lato-Bold.ttf") format("truetype")'
}]
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: Lato-Light;\n' + ' src: url("/fonts/Lato-Light.ttf") format("truetype");\n' + '}\n' + '@font-face {\n' + ' font-family: Lato-Bold;\n' + ' src: url("/fonts/Lato-Bold.ttf") format("truetype");\n' + '}');
});
});
describe('fallbacks object', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': {
fontFamily: 'MyWebFont',
fallbacks: {
fontFamily: 'MyWebFontFallback'
}
}
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: MyWebFontFallback;\n' + ' font-family: MyWebFont;\n' + '}');
});
});
describe('fallbacks array', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': {
fontFamily: 'MyWebFont',
fallbacks: [{ fontFamily: 'MyWebFontFallback' }]
}
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: MyWebFontFallback;\n' + ' font-family: MyWebFont;\n' + '}');
});
});
describe('font faces with fallbacks', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
'@font-face': [{
fontFamily: 'MyWebFont',
fallbacks: {
fontFamily: 'MyWebFontFallback'
}
}]
});
});
it('should generate correct CSS', function () {
(0, _expect2['default'])(sheet.toString()).to.be('@font-face {\n' + ' font-family: MyWebFontFallback;\n' + ' font-family: MyWebFont;\n' + '}');
});
});
describe('function values', function () {
var sheet = void 0;
beforeEach(function () {
sheet = jss.createStyleSheet({
a: {
fontSize: function fontSize() {
return 12;
}
}
});
});
it('should generate correct CSS', function () {
sheet.update();
(0, _expect2['default'])(sheet.toString()).to.be((0, _commonTags.stripIndent)(_templateObject));
});
});
});

View File

@@ -0,0 +1,32 @@
'use strict'
var webpack = require('webpack')
var plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
__DEV__: process.env.NODE_ENV === 'development',
__TEST__: process.env.NODE_ENV === 'test'
})
]
if (process.env.NODE_ENV === 'production') {
plugins.push(new webpack.optimize.UglifyJsPlugin())
}
module.exports = {
output: {
library: 'jssCamelCase',
libraryTarget: 'umd'
},
plugins: plugins,
module: {
loaders: [
{
loader: 'babel-loader',
test: /\.js$/,
exclude: /node_modules/
}
]
}
}