Skip to content

Commit

Permalink
feat(re-styled,styles): testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rotemee committed Aug 22, 2021
1 parent 4a05e3a commit 5b9668d
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/re-styled/src/components/heading/styled-heading.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import styled from 'styled-components';
import { getVariant } from 'utils';
import { tints } from '@elementor/styles';

window.console.log( '*** Rot', tints );

const Heading = styled.h1`
${ ( props ) => getVariant( props.variant, {} ) }
Expand Down
19 changes: 19 additions & 0 deletions packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,24 @@
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0",
"@elementor/styles": "^0.29.0",
"babel-loader": "^8.0.5",
"prop-types": "^15.7.2",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"styled-components": "^5.3.0",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1"
},
"peerDependencies": {
"prop-types": ">=15.7.2",
"react": ">=16.7.0",
"react-dom": ">=16.7.0",
"styled-components": ">=5.3.0"
}
}
48 changes: 48 additions & 0 deletions packages/styles/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const webpack = require( 'webpack' );
const path = require( 'path' );

module.exports = {
mode: 'production',
entry: './src/index.js',
resolve: {
alias: {},
},
output: {
filename: 'index.js',
library: '@elementor/styles',
libraryTarget: 'umd',
path: path.resolve( __dirname, 'lib' ),
umdNamedDefine: true
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
presets: [ [ '@babel/preset-env', { "useBuiltIns": "usage", "corejs": 3 } ], '@babel/preset-react' ],
},
},
],
},
],
},
externals: {
// Don't bundle react or react-dom
react: {
commonjs: "react",
commonjs2: "react",
amd: "React",
root: "React"
},
"react-dom": {
commonjs: "react-dom",
commonjs2: "react-dom",
amd: "ReactDOM",
root: "ReactDOM"
}
}
};

0 comments on commit 5b9668d

Please sign in to comment.