Skip to content

Commit

Permalink
Merge pull request #408 from browniebroke/workspace
Browse files Browse the repository at this point in the history
Convert project to yarn workspaces
  • Loading branch information
browniebroke authored Apr 1, 2020
2 parents 20d4c6b + 819c2c7 commit e9a72b3
Show file tree
Hide file tree
Showing 19 changed files with 5,239 additions and 12,863 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"es6": true,
"node": true
},
"ignorePatterns": ["node_modules/", "dist/"],
"rules": {
"prettier/prettier": [
"error",
Expand Down
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@ language: node_js
jobs:
include:
- stage: test
name: Jest
script:
- yarn test
- yarn workspace @browniebroke/gatsby-image-gallery test
- name: ESlint
script:
- yarn lint:eslint
- name: Prettier
script:
- yarn lint:prettier
- stage: deploy
name: Semantic release
script:
- cd gatsby-image-gallery
- npx semantic-release
4 changes: 1 addition & 3 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "gatsby-image-gallery-example",
"name": "example",
"homepage": "https://browniebroke.github.io/gatsby-image-gallery",
"version": "0.0.0",
"license": "MIT",
"private": false,
"dependencies": {
"@browniebroke/gatsby-image-gallery": "3.2.0",
"babel-plugin-styled-components": "1.10.7",
"gatsby": "2.20.9",
"gatsby-image": "2.3.1",
Expand All @@ -24,7 +23,6 @@
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve"
}
Expand Down
3 changes: 1 addition & 2 deletions example/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import React from 'react'

import Layout from '../components/layout'
import SEO from '../components/seo'
import Gallery from '@browniebroke/gatsby-image-gallery'
import '@browniebroke/gatsby-image-gallery/dist/style.css'
import Gallery from '../../../gatsby-image-gallery/src'

const IndexPage = ({ data }) => {
const fullSize = data.images.edges.map((edge) => edge.node.full.fluid.src)
Expand Down
12,430 changes: 0 additions & 12,430 deletions example/yarn.lock

This file was deleted.

File renamed without changes.
File renamed without changes.
80 changes: 80 additions & 0 deletions gatsby-image-gallery/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"name": "@browniebroke/gatsby-image-gallery",
"version": "0.0.0",
"description": "Very basic gallery grid based on gatsby-image.",
"author": "browniebroke",
"license": "MIT",
"repository": "browniebroke/gatsby-image-gallery",
"main": "dist/index.js",
"module": "dist/index.es.js",
"jsnext:main": "dist/index.es.js",
"engines": {
"node": ">=10",
"npm": ">=5"
},
"scripts": {
"test": "cross-env CI=1 react-scripts test --env=jsdom",
"test:watch": "react-scripts test --env=jsdom",
"build": "rollup -c",
"start": "rollup -c -w",
"prepare": "yarn run build"
},
"peerDependencies": {
"gatsby-image": ">= 2.0",
"prop-types": "^15.5.4",
"react": "^16.8",
"react-dom": "^16.8",
"styled-components": ">= 5.0"
},
"dependencies": {
"react-image-lightbox": "^5.1.1",
"styled-components": "^5.0.0"
},
"homepage": "https://github.com/browniebroke/gatsby-image-gallery#readme",
"devDependencies": {
"@babel/core": "7.9.0",
"@babel/helper-call-delegate": "7.8.7",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-do-expressions": "7.8.3",
"@babel/plugin-proposal-export-default-from": "7.8.3",
"@babel/plugin-proposal-export-namespace-from": "7.8.3",
"@babel/plugin-proposal-function-bind": "7.8.3",
"@babel/plugin-proposal-function-sent": "7.8.3",
"@babel/plugin-proposal-json-strings": "7.8.3",
"@babel/plugin-proposal-logical-assignment-operators": "7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.8.3",
"@babel/plugin-proposal-numeric-separator": "7.8.3",
"@babel/plugin-proposal-optional-chaining": "7.9.0",
"@babel/plugin-proposal-throw-expressions": "7.8.3",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-import-meta": "7.8.3",
"@babel/preset-env": "7.9.0",
"@babel/preset-react": "7.9.4",
"@svgr/rollup": "5.3.0",
"cross-env": "7.0.2",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "3.0.0",
"gatsby-image": "2.3.1",
"prettier": "2.0.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-scripts": "3.4.1",
"react-test-renderer": "16.13.1",
"rollup": "2.3.1",
"rollup-plugin-babel": "4.4.0",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-node-resolve": "5.2.0",
"rollup-plugin-peer-deps-external": "2.2.2",
"rollup-plugin-postcss": "2.5.0",
"rollup-plugin-url": "3.0.1"
},
"files": [
"dist"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[build]
base = "example/"
publish = "public"
command = "yarn build"
publish = "example/public"
command = "yarn workspace example build"
environment = { GATSBY_CPU_COUNT = "1" }
86 changes: 8 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,82 +1,12 @@
{
"name": "@browniebroke/gatsby-image-gallery",
"version": "0.0.0",
"description": "Very basic gallery grid based on gatsby-image.",
"author": "browniebroke",
"license": "MIT",
"repository": "browniebroke/gatsby-image-gallery",
"main": "dist/index.js",
"module": "dist/index.es.js",
"jsnext:main": "dist/index.es.js",
"engines": {
"node": ">=10",
"npm": ">=5"
},
"private": true,
"workspaces": [
"gatsby-image-gallery",
"example"
],
"scripts": {
"format": "prettier --write \"**/*.+(js|json|md)\"",
"test": "cross-env CI=1 react-scripts test --env=jsdom",
"test:watch": "react-scripts test --env=jsdom",
"lint": "eslint --ext .js ./src",
"build": "rollup -c",
"start": "rollup -c -w",
"prepare": "yarn run build"
},
"peerDependencies": {
"gatsby-image": ">= 2.0",
"prop-types": "^15.5.4",
"react": "^16.8",
"react-dom": "^16.8",
"styled-components": ">= 5.0"
},
"dependencies": {
"react-image-lightbox": "^5.1.1",
"styled-components": "^5.0.0"
},
"homepage": "https://github.com/browniebroke/gatsby-image-gallery#readme",
"devDependencies": {
"@babel/core": "7.9.0",
"@babel/helper-call-delegate": "7.8.7",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-do-expressions": "7.8.3",
"@babel/plugin-proposal-export-default-from": "7.8.3",
"@babel/plugin-proposal-export-namespace-from": "7.8.3",
"@babel/plugin-proposal-function-bind": "7.8.3",
"@babel/plugin-proposal-function-sent": "7.8.3",
"@babel/plugin-proposal-json-strings": "7.8.3",
"@babel/plugin-proposal-logical-assignment-operators": "7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.8.3",
"@babel/plugin-proposal-numeric-separator": "7.8.3",
"@babel/plugin-proposal-optional-chaining": "7.9.0",
"@babel/plugin-proposal-throw-expressions": "7.8.3",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-import-meta": "7.8.3",
"@babel/preset-env": "7.9.0",
"@babel/preset-react": "7.9.4",
"@svgr/rollup": "5.3.0",
"cross-env": "7.0.2",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "3.0.0",
"gatsby-image": "2.3.1",
"prettier": "2.0.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-scripts": "3.4.1",
"react-test-renderer": "16.13.1",
"rollup": "2.3.1",
"rollup-plugin-babel": "4.4.0",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-node-resolve": "5.2.0",
"rollup-plugin-peer-deps-external": "2.2.2",
"rollup-plugin-postcss": "2.5.0",
"rollup-plugin-url": "3.0.1"
},
"files": [
"dist"
]
"lint:eslint": "eslint --ext .js .",
"lint:prettier": "prettier --check \"**/*.+(js|json|md)\""
}
}
Loading

0 comments on commit e9a72b3

Please sign in to comment.