Skip to content

Commit

Permalink
Add run-cpa-combinations and check in select files
Browse files Browse the repository at this point in the history
Change-Id: Ie16ce13658f08dc68ebb1d5d2e41ff2f2cce1e03
  • Loading branch information
jaslong committed Jan 31, 2023
1 parent 8914a33 commit b10e15d
Show file tree
Hide file tree
Showing 137 changed files with 5,343 additions and 7 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/create-plasmic-app/cpa-out/
2 changes: 1 addition & 1 deletion packages/create-plasmic-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ yarn-error.log
dist/
.vscode/
.yalc
yalc.lock
yalc.lock
8 changes: 6 additions & 2 deletions packages/create-plasmic-app/README.internal.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Debugging
=========
# Testing

Use `yarn run-cpa` to run CPA with predefined sets of args.
This will update the files in cpa-out, allowing us to review any diffs.

# Debugging

Example invocation:

Expand Down
15 changes: 15 additions & 0 deletions packages/create-plasmic-app/cpa-out/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://jasonstitt.com/gitignore-whitelisting-patterns
# Ignore everything
*
# But descend into directories
!*/

# Whitelist - only add files that we want to track
!/.gitignore
!**/package.json
!**/plasmic.json
!**/tsconfig.json
!**/*.js
!**/*.jsx
!**/*.ts
!**/*.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

import React from "react";
import { PlasmicRootProvider } from "@plasmicapp/react-web";
import Helmet from "react-helmet";

export const wrapRootElement = ({ element }) => {
return (
<PlasmicRootProvider Head={Helmet}>
{element}
</PlasmicRootProvider>
);
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @type {import('gatsby').GatsbyConfig}
*/
module.exports = {
siteMetadata: {
siteUrl: `https://www.yourdomain.tld`,
},
plugins: [],
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

import React from "react";
import { PlasmicRootProvider } from "@plasmicapp/react-web";
import Helmet from "react-helmet";

export const wrapRootElement = ({ element }) => {
return (
<PlasmicRootProvider Head={Helmet}>
{element}
</PlasmicRootProvider>
);
}

26 changes: 26 additions & 0 deletions packages/create-plasmic-app/cpa-out/gatsby-codegen-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "gatsby-codegen-js",
"version": "1.0.0",
"private": true,
"description": "Plasmic app for 47tFXWjN2C4NyHFGGpaYQ3",
"keywords": [
"gatsby"
],
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
"build": "gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean"
},
"dependencies": {
"@plasmicapp/cli": "^0.1.203",
"@plasmicapp/host": "^1.0.98",
"@plasmicapp/react-web": "^0.2.148",
"gatsby": "^5.5.0",
"gatsby-plugin-react-helmet": "^6.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0"
}
}
79 changes: 79 additions & 0 deletions packages/create-plasmic-app/cpa-out/gatsby-codegen-js/plasmic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"platform": "gatsby",
"code": {
"lang": "js",
"scheme": "blackbox",
"reactRuntime": "classic"
},
"style": {
"scheme": "css-modules",
"defaultStyleCssFilePath": "plasmic/plasmic__default_style.css"
},
"images": {
"scheme": "files",
"publicDir": "../../static",
"publicUrlPrefix": "/"
},
"tokens": {
"scheme": "theo",
"tokensFilePath": "plasmic-tokens.theo.json"
},
"srcDir": "src/components",
"defaultPlasmicDir": "./plasmic",
"projects": [
{
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
"projectApiToken": "7BRFratDxPLMGZHnd2grV5QP6mlHcZ1AK3BJSIeh7xzUlHgWh25XpgXvUaKAqHXFMXQQuzpADqboibF6nqNWQ",
"projectName": "create-plasmic-app",
"version": "latest",
"cssFilePath": "plasmic/create_plasmic_app/plasmic_create_plasmic_app.module.css",
"components": [
{
"id": "6uuAAE1jiCew",
"name": "Homepage",
"type": "managed",
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
"renderModuleFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.jsx",
"importSpec": {
"modulePath": "../pages/index.jsx"
},
"cssFilePath": "plasmic/create_plasmic_app/PlasmicHomepage.module.css",
"scheme": "blackbox",
"componentType": "page"
}
],
"icons": [],
"images": [],
"indirect": false,
"globalContextsFilePath": "",
"codeComponents": [
{
"id": "P6aGdYWZ2R",
"name": "PlasmicHead",
"componentImportPath": "@plasmicapp/react-web"
},
{
"id": "8G2A-uTjGa",
"name": "Fetcher",
"componentImportPath": "@plasmicapp/react-web/lib/data-sources"
}
]
}
],
"globalVariants": {
"variantGroups": [
{
"id": "SCBjPXGDXDZBV",
"name": "Screen",
"projectId": "47tFXWjN2C4NyHFGGpaYQ3",
"contextFilePath": "plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx"
}
]
},
"wrapPagesWithGlobalContexts": true,
"gatsbyConfig": {
"pagesDir": "../pages"
},
"cliVersion": "0.1.203",
"$schema": "https://unpkg.com/@plasmicapp/[email protected]/dist/plasmic.schema.json"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// @ts-nocheck
/* eslint-disable */
/* tslint:disable */
/* prettier-ignore-start */
import * as React from "react";
import * as p from "@plasmicapp/react-web";

export const ScreenContext = React.createContext(
"PLEASE_RENDER_INSIDE_PROVIDER"
);
/**
* @deprecated Plasmic now uses a custom hook for Screen variants, which is
* automatically included in your components. Please remove this provider
* from your code.
*/

export function ScreenVariantProvider(props) {
console.warn(
"DEPRECATED: Plasmic now uses a custom hook for Screen variants, which is automatically included in your components. Please remove this provider from your code."
);
return props.children;
}

export const useScreenVariants = p.createUseScreenVariants(true, {
desktopOnly: "(min-width:768px)",
});

export default ScreenContext;
/* prettier-ignore-end */
Loading

0 comments on commit b10e15d

Please sign in to comment.