Skip to content

Commit

Permalink
Merge c61ef9c into 8bd6383
Browse files Browse the repository at this point in the history
  • Loading branch information
jonambas committed Aug 7, 2019
2 parents 8bd6383 + c61ef9c commit b149528
Show file tree
Hide file tree
Showing 52 changed files with 14,284 additions and 13,924 deletions.
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start:storybook": "start-storybook -p 9001 -c .storybook",
"prebuild": "lerna bootstrap",
"build": "lerna run build --ignore @sparkpost/matchbox-site",
"build:site": "npm run bootstrap && lerna exec --scope @sparkpost/matchbox-site -- npm run build",
"build:site": "lerna exec --scope @sparkpost/matchbox-site -- npm run build",
"clean": "lerna clean --yes",
"bootstrap": "lerna bootstrap",
"pretest": "npm run build && npm run clean && lerna link",
Expand All @@ -25,7 +25,6 @@
]
},
"dependencies": {
"@sparkpost/design-tokens": "0.0.4",
"downshift": "^3.2.10",
"jest-in-case": "^1.0.2",
"prop-types": "^15.6.1",
Expand Down
5 changes: 5 additions & 0 deletions packages/matchbox-site/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
../matchbox/*
!../matchbox/src

../matchbox-icons/*
!../matchbox-icons/src
73 changes: 67 additions & 6 deletions packages/matchbox-site/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,69 @@
# Project dependencies
.cache
node_modules
yarn-error.log
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Build directory
/public
# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variables file
.env

# gatsby files
.cache/
public

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
6 changes: 4 additions & 2 deletions packages/matchbox-site/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"semi": false,
"endOfLine": "lf",
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
"tabWidth": 2,
"trailingComma": "none"
}
5 changes: 2 additions & 3 deletions packages/matchbox-site/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# matchbox-site

## Local Development
```bash
# Runs gatsby at localhost:8000
npm run start:site
# Starts gatsby at localhost:8001
npm run start
```
7 changes: 7 additions & 0 deletions packages/matchbox-site/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/

// You can delete this file if you're not using it
41 changes: 29 additions & 12 deletions packages/matchbox-site/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
const path = require('path');
module.exports = {
siteMetadata: {
title: 'Matchbox'
title: 'Matchbox',
description: 'SparkPost Design System',
author: '@sparkpost'
},
plugins: [
'gatsby-plugin-react-next',
'gatsby-plugin-react-helmet',
'gatsby-plugin-sass',
'gatsby-transformer-react-docgen',
{
resolve: 'gatsby-source-filesystem',
resolve: 'gatsby-plugin-mdx',
options: {
name: 'components',
path: path.resolve(__dirname, '../matchbox/src/components')
defaultLayouts: {
default: require.resolve('./src/components/Layout/Layout.js')
}
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'icon',
path: path.resolve(__dirname, '../matchbox-icons/src/IconBase')
name: 'images',
path: `${__dirname}/src/images`
}
},
'gatsby-plugin-mdx',
'gatsby-transformer-json',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'pages',
path: `${__dirname}/src/pages/`
name: 'routes',
path: `${__dirname}/src/routes`
}
},
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'gatsby-starter-default',
short_name: 'starter',
start_url: '/',
background_color: '#663399',
theme_color: '#663399',
display: 'minimal-ui',
icon: 'src/images/gatsby-icon.png' // This path is relative to the root of the site.
}
}
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
]
};
56 changes: 5 additions & 51 deletions packages/matchbox-site/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,5 @@
const path = require('path');

// Use this to create pages from mdx files
// exports.createPages = ({ graphql, boundActionCreators }) => {
// const { createPage } = boundActionCreators
//
// return new Promise((resolve, reject) => {
// graphql(`
// {
// allFile(filter: { extension: { eq: "mdx" } }) {
// edges {
// node {
// absolutePath
// relativeDirectory
// name
// }
// }
// }
// }
// `)
// .then(result => {
// if (result.errors) {
// return reject(result.errors)
// }
//
// // Create markdown pages.
// result.data.allFile.edges.forEach(
// ({ node: { absolutePath, relativeDirectory, name } }) => {
// createPage({
// path: `${relativeDirectory}/${name}`,
// component: absolutePath,
// })
// }
// )
// })
// .then(resolve)
// })
// }

exports.modifyWebpackConfig = ({ config }) => {
config.merge({
resolve: {
alias: {
'@sparkpost/matchbox-icons': path.resolve(__dirname, '../matchbox-icons/src'),
'@sparkpost/matchbox': path.resolve(__dirname, '../matchbox/src')
}
}
});

return config;
};
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
7 changes: 7 additions & 0 deletions packages/matchbox-site/gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/

// You can delete this file if you're not using it

0 comments on commit b149528

Please sign in to comment.