Browse Source

making it

pull/1/head
remorses 1 year ago
parent
commit
b5b8181080
25 changed files with 14256 additions and 477 deletions
  1. +0
    -4
      .dockerignore
  2. +0
    -14
      Dockerfile
  3. +0
    -0
      core/VERSION
  4. +44
    -0
      core/package.json
  5. +50
    -0
      core/src/Hero/index.tsx
  6. +1
    -0
      core/src/index.ts
  7. +0
    -0
      core/tests/init.js
  8. +0
    -0
      core/tests/simple.ts
  9. +1
    -1
      core/tsconfig.json
  10. +1438
    -0
      core/yarn.lock
  11. +25
    -0
      demos/.gitignore
  12. +30
    -0
      demos/README.md
  13. +2
    -0
      demos/next-env.d.ts
  14. +9
    -0
      demos/next.config.js
  15. +22
    -0
      demos/package.json
  16. +12
    -0
      demos/pages/index.tsx
  17. BIN
      demos/public/favicon.ico
  18. +10
    -0
      demos/public/zeit.svg
  19. +19
    -0
      demos/tsconfig.json
  20. +5938
    -0
      demos/yarn.lock
  21. +0
    -14
      example/index.html
  22. +0
    -9
      example/index.tsx
  23. +5
    -33
      package.json
  24. +0
    -1
      src/index.ts
  25. +6650
    -401
      yarn.lock

+ 0
- 4
.dockerignore View File

@ -1,4 +0,0 @@
node_modules
dist
esm
example

+ 0
- 14
Dockerfile View File

@ -1,14 +0,0 @@
FROM node:12-alpine
RUN apk add --no-cache dumb-init # build-base
WORKDIR /workdir
COPY *.json *.lock /workdir/
RUN yarn
COPY . /workdir/
ENTRYPOINT ["dumb-init", "--"]
CMD yarn dev

VERSION → core/VERSION View File


+ 44
- 0
core/package.json View File

@ -0,0 +1,44 @@
{
"name": "react-landing",
"_": "[bump]",
"version": "0.0.1",
"description": "",
"main": "dist/index.js",
"module": "esm/index.js",
"types": "dist/index.d.ts",
"mocha": {
"require": "tests/init.js",
"spec": "tests/**.ts",
"timeout": 9999999999
},
"files": [
"/dist/*",
"/esm/*"
],
"scripts": {
"test": "NODE_ENV=test mocha --colors --exit",
"example": "parcel serve --no-autoinstall example/index.html",
"compile": "sucrase -q ./src -d ./dist --transforms typescript,imports",
"dev": "yarn compile && node dist"
},
"keywords": [],
"author": "Tommaso De Rossi, morse <beats.by.morse@gmail.com>",
"license": "ISC",
"devDependencies": {
"@types/mocha": "^5.2.7",
"@types/node": "^12.0.7",
"@types/react": "^16.9.25",
"dotenv": "^8.2.0",
"mocha": "^6.1.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"sucrase": "^3.12.1",
"typescript": "^3.7.5"
},
"dependencies": {
"@chakra-ui/core": "^0.6.1",
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"emotion-theming": "^10.0.27"
}
}

+ 50
- 0
core/src/Hero/index.tsx View File

@ -0,0 +1,50 @@
import React from 'react'
import { Image, Flex, Box } from '@chakra-ui/core'
export const Hero = ({
bg = 'white',
backgroundImage = null,
bgOpacity = 1,
style = {},
children = [],
...props
}) => (
<Box display='relative'>
{backgroundImage && (
<Box
display='absolute'
top={0}
right={0}
bottom={0}
left={0}
zIndex={-2}
style={{ height: '100%' }}
>
<Image
src={backgroundImage}
alt=''
width={1}
style={{ height: '100%', objectFit: 'cover' }}
/>
</Box>
)}
<Box
top={0}
right={0}
bottom={0}
left={0}
zIndex={-1}
bg={bg}
style={{ opacity: backgroundImage ? bgOpacity : 1, height: '100%' }}
/>
<Flex
style={{
minHeight: '100vh',
...style,
}}
{...props}
>
{children}
</Flex>
</Box>
)

+ 1
- 0
core/src/index.ts View File

@ -0,0 +1 @@
export { Hero } from './Hero'

tests/init.js → core/tests/init.js View File


tests/simple.ts → core/tests/simple.ts View File


tsconfig.json → core/tsconfig.json View File

@ -20,7 +20,7 @@
"node_modules",
"dist",
"esm",
"example",
"_",
"tests",
]
}

+ 1438
- 0
core/yarn.lock
File diff suppressed because it is too large
View File


+ 25
- 0
demos/.gitignore View File

@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
.env*
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

+ 30
- 0
demos/README.md View File

@ -0,0 +1,30 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/zeit/next.js/) - your feedback and contributions are welcome!
## Deploy on ZEIT Now
The easiest way to deploy your Next.js app is to use the [ZEIT Now Platform](https://zeit.co/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

+ 2
- 0
demos/next-env.d.ts View File

@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />

+ 9
- 0
demos/next.config.js View File

@ -0,0 +1,9 @@
const path = require('path')
const withTM = require('next-transpile-modules')(['src']) // pass the modules you would like to see transpiled
module.exports = withTM({
webpack: (config) => {
config.resolve.alias['src'] = path.resolve(__dirname) + '/../src'
return config
},
})

+ 22
- 0
demos/package.json View File

@ -0,0 +1,22 @@
{
"name": "demos",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@types/node": "^13.9.3",
"@types/react": "^16.9.25",
"next": "^9.3.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"typescript": "^3.8.3",
"react-landing": "0.0.2"
},
"devDependencies": {
"next-transpile-modules": "^3.1.0"
}
}

+ 12
- 0
demos/pages/index.tsx View File

@ -0,0 +1,12 @@
import React from 'react'
import Head from 'next/head'
import { Hero } from 'react-landing/src'
const Page = () => (
<div>
<Hero />
</div>
)
export default Page

BIN
demos/public/favicon.ico View File

Before After

+ 10
- 0
demos/public/zeit.svg View File

@ -0,0 +1,10 @@
<svg width="82" height="16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="url(#prefix__paint0_linear)" d="M9.018 0l9.019 16H0L9.018 0z"/>
<path fill="#333" fill-rule="evenodd" d="M51.634 12.028h-6.492V2.052h6.492v1.256H46.61v3.007h4.37V7.57h-4.37v3.202h5.024v1.255zm-14.063 0h-7.235v-1.096l5.342-7.624h-5.253V2.052h7.058v1.097l-5.342 7.623h5.43v1.256zm21.88 0h6.333v-1.256h-2.423V3.308h2.423V2.052h-6.332v1.256h2.441v7.465h-2.441v1.255zm18.22 0h-1.468v-8.72h-3.36V2.052h8.225v1.256H77.67v8.72z" clip-rule="evenodd"/>
<defs>
<linearGradient id="prefix__paint0_linear" x1="28.022" x2="16.189" y1="22.991" y2="8.569" gradientUnits="userSpaceOnUse">
<stop stop-color="#fff"/>
<stop offset="1"/>
</linearGradient>
</defs>
</svg>

+ 19
- 0
demos/tsconfig.json View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
}

+ 5938
- 0
demos/yarn.lock
File diff suppressed because it is too large
View File


+ 0
- 14
example/index.html View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Toggle with Typescript</title>
</head>
<body>
<div id="root"></div>
<script src="./index.tsx"></script>
</body>
</html>

+ 0
- 9
example/index.tsx View File

@ -1,9 +0,0 @@
// import React from 'react'
// import { render } from 'react-dom'
// render(<App />, document.getElementById('root'))
// // @ts-ignore
// if (module.hot) {
// // @ts-ignore
// module.hot.accept()
// }

+ 5
- 33
package.json View File

@ -1,35 +1,7 @@
{
"name": "react-landing",
"_": "[bump]",
"version": "0.0.1",
"description": "",
"main": "dist/index.js",
"module": "esm/index.js",
"types": "dist/index.d.ts",
"mocha": {
"require": "tests/init.js",
"spec": "tests/**.ts",
"timeout": 9999999999
},
"files": [
"/dist/*",
"/esm/*"
],
"scripts": {
"test": "NODE_ENV=test mocha --colors --exit",
"example": "parcel serve --no-autoinstall example/index.html",
"compile": "sucrase -q ./src -d ./dist --transforms typescript,imports",
"dev": "yarn compile && node dist"
},
"keywords": [],
"author": "Tommaso De Rossi, morse <beats.by.morse@gmail.com>",
"license": "ISC",
"devDependencies": {
"@types/mocha": "^5.2.7",
"@types/node": "^12.0.7",
"dotenv": "^8.2.0",
"mocha": "^6.1.4",
"sucrase": "^3.12.1",
"typescript": "^3.7.5"
}
"private": true,
"workspaces": [
"core",
"demos"
]
}

+ 0
- 1
src/index.ts View File

@ -1 +0,0 @@
export const ok = true

+ 6650
- 401
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save