@punch-in/buffet-modern-custom 3.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { mount } from 'enzyme';
3
+
4
+ import List from '../index';
5
+
6
+ describe('<List />', () => {
7
+ // eslint-disable-next-line jest/expect-expect
8
+ it('It should not crash', () => {
9
+ mount(<List />);
10
+ });
11
+ });
package/src/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { default as DateTime } from './components/DateTime';
2
+ export { default as Header } from './components/Header';
3
+ export { default as Inputs } from './components/Inputs';
4
+ export { default as List } from './components/List';
@@ -0,0 +1,3 @@
1
+ const rootConf = require('../../tools-configuration/stylelint.config.js');
2
+
3
+ module.exports = { ...rootConf };
@@ -0,0 +1,9 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
2
+ import 'jest-styled-components';
3
+ import { configure } from 'enzyme';
4
+ import Adapter from 'enzyme-adapter-react-16';
5
+
6
+ configure({
7
+ adapter: new Adapter(),
8
+ disableLifecycleMethods: false,
9
+ });
@@ -0,0 +1,64 @@
1
+ const webpack = require('webpack');
2
+ const path = require('path');
3
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
+ const packageJson = require('./package.json');
5
+
6
+ const nodeModules = [];
7
+ [
8
+ ...Object.keys(packageJson.dependencies),
9
+ ...Object.keys(packageJson.peerDependencies),
10
+ ...Object.keys(packageJson.devDependencies),
11
+ ].forEach(module => {
12
+ nodeModules.push(new RegExp(`^${module}(/.+)?$`));
13
+ });
14
+
15
+ module.exports = {
16
+ entry: `${__dirname}/src/index.js`,
17
+ externals: nodeModules,
18
+ mode: process.env.NODE_ENV,
19
+ output: {
20
+ path: `${__dirname}/build`,
21
+ filename: `bundle.${process.env.NODE_ENV || 'development'}.js`,
22
+ library: packageJson.name,
23
+ libraryTarget: 'umd',
24
+ umdNamedDefine: true,
25
+ },
26
+ module: {
27
+ rules: [
28
+ {
29
+ test: /\.js$/,
30
+ include: path.resolve(__dirname, 'src'),
31
+ loader: 'babel-loader',
32
+ exclude: /(node_modules|lib)/,
33
+ },
34
+ {
35
+ test: /\.css$/,
36
+ use: [
37
+ process.env.NODE_ENV === 'production'
38
+ ? MiniCssExtractPlugin.loader
39
+ : 'style-loader',
40
+ 'css-loader',
41
+ ],
42
+ },
43
+ {
44
+ test: /\.(png|svg|jpg|gif)$/,
45
+ loader: 'url-loader',
46
+ options: {
47
+ limit: 8192,
48
+ },
49
+ },
50
+ ],
51
+ },
52
+ resolve: {
53
+ extensions: ['*', '.js'],
54
+ cacheWithContext: false,
55
+ },
56
+ plugins: [
57
+ new webpack.EnvironmentPlugin({
58
+ NODE_ENV: process.env.NODE_ENV || 'development',
59
+ }),
60
+ new MiniCssExtractPlugin({
61
+ filename: 'style.css',
62
+ }),
63
+ ],
64
+ };