Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4f03dec
Showing
19 changed files
with
5,685 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/build/ | ||
node_modules/ | ||
|
||
/.tsc-output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// This is a CommonJS module because when we run Babel inside | ||
// of Jest, it complains that it needs to be run in asynchronous | ||
// mode. No idea why... | ||
|
||
module.exports = { | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
node: "current" | ||
} | ||
} | ||
], | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default { | ||
projects: [ | ||
"<rootDir>/packages/remix", | ||
"<rootDir>/packages/@remix-run-core", | ||
"<rootDir>/packages/@remix-run-express" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"private": true, | ||
"name": "remix-packages", | ||
"type": "module", | ||
"scripts": { | ||
"clean": "git clean -fdX .", | ||
"test": "jest", | ||
"build": "node ./scripts/build.js", | ||
"watch": "node ./scripts/watch.js" | ||
}, | ||
"workspaces": [ | ||
"packages/remix", | ||
"packages/@remix-run-core", | ||
"packages/@remix-run-express" | ||
], | ||
"dependencies": { | ||
"@babel/core": "^7.10.4", | ||
"@babel/preset-env": "^7.10.4", | ||
"@babel/preset-react": "^7.10.4", | ||
"@babel/preset-typescript": "^7.10.4", | ||
"@types/jest": "^25.2.3", | ||
"@types/react": "^16.9.41", | ||
"@types/react-test-renderer": "^16.9.2", | ||
"@typescript-eslint/eslint-plugin": "2.x", | ||
"@typescript-eslint/parser": "2.x", | ||
"babel-eslint": "10.x", | ||
"eslint": "6.x", | ||
"eslint-config-react-app": "^5.2.1", | ||
"eslint-plugin-flowtype": "4.x", | ||
"eslint-plugin-import": "2.x", | ||
"eslint-plugin-jsx-a11y": "6.x", | ||
"eslint-plugin-react": "7.x", | ||
"eslint-plugin-react-hooks": "2.x", | ||
"history": "^5.0.0", | ||
"jest": "^26.0.1", | ||
"prettier": "^2.0.5", | ||
"react": "0.0.0-experimental-33c3af284", | ||
"react-dom": "0.0.0-experimental-33c3af284", | ||
"react-router-dom": "0.0.0-experimental-ffd8c7d0", | ||
"react-test-renderer": "0.0.0-experimental-33c3af284", | ||
"rollup": "^2.21.0", | ||
"typescript": "^3.9.6" | ||
}, | ||
"prettier": { | ||
"arrowParens": "avoid", | ||
"trailingComma": "none" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function createHttpHandler() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as createHttpHandler } from "./createHttpHandler"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@remix-run/core", | ||
"version": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { createHttpHandler } from "@remix-run/core"; | ||
|
||
export default createHttpHandler(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@remix-run/express", | ||
"version": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from "react"; | ||
import { create as createTestRenderer } from "react-test-renderer"; | ||
import { RemixLink } from "remix"; | ||
|
||
describe("A <RemixLink>", () => { | ||
it("works", () => { | ||
let renderer = createTestRenderer(<RemixLink />); | ||
expect(renderer.toJSON()).toMatchInlineSnapshot(` | ||
<a | ||
href="#" | ||
> | ||
link | ||
</a> | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
export function RemixLink() { | ||
return <a href="#">link</a>; | ||
} | ||
|
||
export function RemixEntryProvider() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "remix", | ||
"version": "0.0.0", | ||
"peerDependencies": { | ||
"history": ">=5", | ||
"react": "0.0.0-experimental-33c3af284", | ||
"react-dom": "0.0.0-experimental-33c3af284", | ||
"react-router-dom": "0.0.0-experimental-ffd8c7d0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { exec } from "./utils.js"; | ||
|
||
async function build() { | ||
await exec("tsc -b"); | ||
|
||
await exec("mkdir -p build/@remix-run"); | ||
|
||
await Promise.all([ | ||
exec("cp -r .tsc-output/remix build/remix"), | ||
exec("cp -r .tsc-output/@remix-run-core build/@remix-run/core"), | ||
exec("cp -r .tsc-output/@remix-run-express build/@remix-run/express") | ||
]); | ||
|
||
return 0; | ||
} | ||
|
||
build().then(code => { | ||
process.exit(code); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import childProcess from "child_process"; | ||
import util from "util"; | ||
|
||
export const exec = util.promisify(childProcess.exec); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { spawn } from "child_process"; | ||
|
||
spawn("tsc", ["--watch"], { | ||
env: process.env, | ||
stdio: "inherit" | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"module": "esnext", | ||
"target": "es2018", | ||
"moduleResolution": "node", | ||
"downlevelIteration": true, | ||
"esModuleInterop": true, | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"declaration": true, | ||
"outDir": ".tsc-output", | ||
"sourceMap": true, | ||
"skipLibCheck": true, | ||
"jsx": "react" | ||
}, | ||
"files": [ | ||
"packages/@remix-run-core/index.tsx", | ||
"packages/@remix-run-express/index.tsx", | ||
"packages/remix/index.tsx" | ||
], | ||
"include": ["types/global.d.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
declare const __DEV__: boolean; |
Oops, something went wrong.