Commit b0ecc353 authored by Ben Galloway's avatar Ben Galloway

Move to build structure with Babel

parent c202aa90
{
"presets": ["@babel/preset-react", ["@babel/preset-env", { "targets": "> 0.25%, not dead" }]]
}
node_modules
import React from "react";
import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles";
import { CssBaseline } from "@material-ui/core";
"use strict";
const GSCTheme = createMuiTheme({
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _styles = require("@material-ui/core/styles");
var _core = require("@material-ui/core");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var GSCTheme = (0, _styles.createMuiTheme)({
palette: {
primary: {
main: "#2e2d44",
contrastText: "#f1f4f5",
contrastText: "#f1f4f5"
},
secondary: {
main: "#30b7bb",
contrastText: "#2e2d44",
contrastText: "#2e2d44"
},
error: {
main: "#e40426",
main: "#e40426"
},
background: {
default: "#f1f4f5",
paper: "#ffffff",
},
paper: "#ffffff"
}
},
typography: {
fontFamily: [
'"Helvetica Neue"',
"Arial",
"sans-serif",
"-apple-system",
"BlinkMacSystemFont",
'"Segoe UI"',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
].join(","),
useNextVariants: true,
fontFamily: ['"Helvetica Neue"', "Arial", "sans-serif", "-apple-system", "BlinkMacSystemFont", '"Segoe UI"', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(","),
h1: {
fontFamily: "ProximaNova",
fontWeight: 600,
fontWeight: 600
},
h2: {
fontFamily: "ProximaNova",
fontWeight: 600,
fontWeight: 600
},
h3: {
fontFamily: "ProximaNova",
fontWeight: 600,
fontWeight: 600
},
h4: {
fontFamily: "ProximaNova",
fontWeight: 600,
fontWeight: 600
},
h5: {
fontFamily: "ProximaNova",
fontWeight: 600,
fontWeight: 600
},
h6: {
fontFamily: "ProximaNova",
fontWeight: 600,
fontWeight: 600
},
button: {
textTransform: "none",
textTransform: "none"
},
buttonNext: {
textTransform: "none",
},
},
textTransform: "none"
}
}
});
const GSCMaterial = props =>
React.createElement(MuiThemeProvider, { theme: GSCTheme }, React.createElement(CssBaseline, null), props.children);
var GSCMaterial = function GSCMaterial(props) {
return _react.default.createElement(_styles.MuiThemeProvider, {
theme: GSCTheme
}, _react.default.createElement(_core.CssBaseline, null), props.children);
};
export default GSCMaterial;
var _default = GSCMaterial;
exports.default = _default;
\ No newline at end of file
{
"name": "gsc-material",
"version": "1.0.0",
"version": "1.0.1",
"description": "An implementation of Material-UI with GSC styling",
"main": "index.js",
"repository": "https://git.gsc.org.uk/utils/gsc-material.git",
"author": "Ben Galloway <ben.galloway@gsc.org.uk>",
"license": "MIT",
"private": true,
"files": [
"index.js",
"ProximaNovaFontFace.css"
],
"peerDependencies": {
"react": "^16.5.2",
"@material-ui/core": "^3.3.0"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.0.0"
},
"scripts": {
"build": "NODE_ENV=production babel src -d . --copy-files"
}
}
@font-face {
font-family: "ProximaNova";
font-style: normal;
font-weight: 300;
src: url("https://style.gsc.org.uk/fonts/ProximaNova-Light.eot");
src: url("https://style.gsc.org.uk/fonts/ProximaNova-Light.eot?#iefix") format("embedded-opentype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Light.woff2") format("woff2"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Light.woff") format("woff"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Light.ttf") format("truetype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Light.svg#ProximaNova-Light") format("svg");
}
@font-face {
font-family: "ProximaNova";
font-style: normal;
font-weight: 600;
src: url("https://style.gsc.org.uk/fonts/ProximaNova-Semibold.eot");
src: url("https://style.gsc.org.uk/fonts/ProximaNova-Semibold.eot?#iefix") format("embedded-opentype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Semibold.woff2") format("woff2"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Semibold.woff") format("woff"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Semibold.ttf") format("truetype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-Semibold.svg#ProximaNova-Semibold") format("svg");
}
@font-face {
font-family: "ProximaNova";
font-style: italic;
font-weight: 300;
src: url("https://style.gsc.org.uk/fonts/ProximaNova-LightIt.eot");
src: url("https://style.gsc.org.uk/fonts/ProximaNova-LightIt.eot?#iefix") format("embedded-opentype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-LightIt.woff2") format("woff2"),
url("https://style.gsc.org.uk/fonts/ProximaNova-LightIt.woff") format("woff"),
url("https://style.gsc.org.uk/fonts/ProximaNova-LightIt.ttf") format("truetype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-LightIt.svg#ProximaNova-LightIt") format("svg");
}
@font-face {
font-family: "ProximaNova";
font-style: italic;
font-weight: 600;
src: url("https://style.gsc.org.uk/fonts/ProximaNova-SemiboldIt.eot");
src: url("https://style.gsc.org.uk/fonts/ProximaNova-SemiboldIt.eot?#iefix") format("embedded-opentype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-SemiboldIt.woff2") format("woff2"),
url("https://style.gsc.org.uk/fonts/ProximaNova-SemiboldIt.woff") format("woff"),
url("https://style.gsc.org.uk/fonts/ProximaNova-SemiboldIt.ttf") format("truetype"),
url("https://style.gsc.org.uk/fonts/ProximaNova-SemiboldIt.svg#ProximaNova-SemiboldIt") format("svg");
}
import React from "react";
import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles";
import { CssBaseline } from "@material-ui/core";
const GSCTheme = createMuiTheme({
palette: {
primary: {
main: "#2e2d44",
contrastText: "#f1f4f5",
},
secondary: {
main: "#30b7bb",
contrastText: "#2e2d44",
},
error: {
main: "#e40426",
},
background: {
default: "#f1f4f5",
paper: "#ffffff",
},
},
typography: {
useNextVariants: true,
fontFamily: [
'"Helvetica Neue"',
"Arial",
"sans-serif",
"-apple-system",
"BlinkMacSystemFont",
'"Segoe UI"',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
].join(","),
h1: {
fontFamily: "ProximaNova",
fontWeight: 600,
},
h2: {
fontFamily: "ProximaNova",
fontWeight: 600,
},
h3: {
fontFamily: "ProximaNova",
fontWeight: 600,
},
h4: {
fontFamily: "ProximaNova",
fontWeight: 600,
},
h5: {
fontFamily: "ProximaNova",
fontWeight: 600,
},
h6: {
fontFamily: "ProximaNova",
fontWeight: 600,
},
button: {
textTransform: "none",
},
buttonNext: {
textTransform: "none",
},
},
});
const GSCMaterial = props => (
<MuiThemeProvider theme={GSCTheme}>
<CssBaseline />
{props.children}
</MuiThemeProvider>
);
export default GSCMaterial;
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment