🔧 Removed ES modules exports for components because react-scripts
This commit is contained in:
parent
3dbaed0411
commit
f123d9fea3
6 changed files with 24 additions and 20 deletions
|
@ -6,6 +6,9 @@ customRollup:
|
|||
- components
|
||||
- core
|
||||
packageJson:
|
||||
components:
|
||||
# react-scripts doesn't handle .mjs files correctly
|
||||
module: '!'
|
||||
create-freesewing-pattern:
|
||||
bin:
|
||||
create-freesewing-pattern: index.js
|
||||
|
|
|
@ -21,6 +21,9 @@ css-theme:
|
|||
components:
|
||||
test: "echo \"{{name}}: No tests configured. Perhaps you'd like to do this?\" && exit 0"
|
||||
storybook: "start-storybook -p 6663"
|
||||
# react-scripts doesn't handle .mjs files correctly
|
||||
modulebuild: '!'
|
||||
build: "npm run clean && npm run nodebuild"
|
||||
core:
|
||||
test: "BABEL_ENV=production nyc mocha tests/*.test.js"
|
||||
report: "BABEL_ENV=production nyc report --reporter=html mocha --compilers js:babel-core/register tests/*.test.js"
|
||||
|
|
|
@ -14,12 +14,10 @@
|
|||
"react"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"nodebuild": "BABEL_ENV=production rollup -c -o dist/index.js -f cjs",
|
||||
"modulebuild": "BABEL_ENV=production rollup -c -o dist/index.mjs -f es",
|
||||
"build": "npm run clean && npm run nodebuild && npm run modulebuild",
|
||||
"build": "npm run clean && npm run nodebuild",
|
||||
"test": "echo \"components: No tests configured. Perhaps you'd like to do this?\" && exit 0",
|
||||
"pubtest": "npm publish --registry http://localhost:6662",
|
||||
"pubforce": "npm publish",
|
||||
|
@ -27,18 +25,18 @@
|
|||
"storybook": "start-storybook -p 6663"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@freesewing/css-theme": "^2.0.0-alpha.13",
|
||||
"@freesewing/i18n": "^2.0.0-alpha.13",
|
||||
"@freesewing/mui-theme": "^2.0.0-alpha.13",
|
||||
"@freesewing/pattern-info": "^2.0.0-alpha.13",
|
||||
"@freesewing/utils": "^2.0.0-alpha.13",
|
||||
"react": "^16.4.1",
|
||||
"prop-types": "15.7.2",
|
||||
"@freesewing/pattern-info": "^2.0.0-alpha.14",
|
||||
"@freesewing/mui-theme": "^2.0.0-alpha.14",
|
||||
"@freesewing/css-theme": "^2.0.0-alpha.14",
|
||||
"typeface-roboto-condensed": "latest",
|
||||
"@freesewing/i18n": "^2.0.0-alpha.14",
|
||||
"@freesewing/utils": "^2.0.0-alpha.14",
|
||||
"react-intl": "^2.8.0",
|
||||
"@material-ui/core": "^3.9.3",
|
||||
"@material-ui/icons": "^3.0.2",
|
||||
"@material-ui/lab": "^3.0.0-alpha.30",
|
||||
"prop-types": "15.7.2",
|
||||
"react": "^16.4.1",
|
||||
"react-intl": "^2.8.0",
|
||||
"typeface-roboto-condensed": "latest"
|
||||
"@material-ui/lab": "^3.0.0-alpha.30"
|
||||
},
|
||||
"files": [
|
||||
"dist/*",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
const Logo = props => {
|
||||
const Ogol = props => {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -19,15 +19,15 @@ const Logo = props => {
|
|||
);
|
||||
};
|
||||
|
||||
Logo.propTypes = {
|
||||
Ogol.propTypes = {
|
||||
size: PropTypes.number,
|
||||
embed: PropTypes.bool
|
||||
};
|
||||
|
||||
Logo.defaultProps = {
|
||||
Ogol.defaultProps = {
|
||||
size: 24,
|
||||
embed: false,
|
||||
color: "#fff"
|
||||
};
|
||||
|
||||
export default Logo;
|
||||
export default Ogol;
|
||||
|
|
|
@ -4,9 +4,9 @@ import withGist from "../withGist";
|
|||
import { FormattedMessage, IntlProvider } from "react-intl";
|
||||
import Button from "@material-ui/core/Button";
|
||||
import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles";
|
||||
import { i18n, strings } from "@freesewing/i18n";
|
||||
import { strings } from "@freesewing/i18n";
|
||||
import Navbar from "../Navbar";
|
||||
import { defaultGist, storage, partList } from "@freesewing/utils";
|
||||
import { defaultGist, storage } from "@freesewing/utils";
|
||||
import { dark, light } from "@freesewing/mui-theme";
|
||||
import Logo from "../Logo";
|
||||
import withLanguage from "../withLanguage";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export { default as draftConfigurator } from "./DraftConfigurator";
|
||||
export { default as DraftConfigurator } from "./DraftConfigurator";
|
||||
export { default as Emblem } from "./Emblem";
|
||||
export { default as Logo } from "./Logo";
|
||||
export { default as Navbar } from "./Navbar";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue