tada: bootstrap all the things (#2)
This commit is contained in:
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.log
|
||||
.DS_Store
|
||||
.jest-*
|
||||
lib
|
||||
node_modules
|
||||
reports
|
||||
*.log
|
||||
16
.npmignore
Normal file
16
.npmignore
Normal file
@@ -0,0 +1,16 @@
|
||||
.DS_Store
|
||||
.prettierrc
|
||||
.nyc_output
|
||||
.travis.yml
|
||||
coverage
|
||||
coverage.lcov
|
||||
bench
|
||||
docs
|
||||
src
|
||||
examples
|
||||
babel.config.js
|
||||
test
|
||||
CONTRIBUTING.md
|
||||
CODE_OF_CONDUCT.md
|
||||
*.ts
|
||||
!*.d.ts
|
||||
6
lerna.json
Normal file
6
lerna.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": "0.0.1",
|
||||
"packages": ["packages/*"],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true
|
||||
}
|
||||
37
package.json
Normal file
37
package.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"private": true,
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
"packages/*",
|
||||
"examples/*"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"yarn": "^1.19.1",
|
||||
"node": ">=12.16.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "lerna exec --stream -- yarn build",
|
||||
"lerna": "lerna",
|
||||
"lerna-prepare": "lerna run prepare",
|
||||
"start": "lerna exec --parallel -- yarn start",
|
||||
"test": "npm-run-all -s lint jest test:peril",
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:update": "jest --updateSnapshot",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^7.0.0",
|
||||
"husky": "^4.2.3",
|
||||
"jest": "^25.1.0",
|
||||
"lerna": "^3.20.2",
|
||||
"lint-staged": "^10.0.7",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^1.19.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"typescript": "^3.7.5",
|
||||
"tsdx": "^0.12.3",
|
||||
"tslib": "^1.10.0",
|
||||
"@types/jest": "^25.1.3"
|
||||
}
|
||||
}
|
||||
8
packages/cli/.gitignore
vendored
Normal file
8
packages/cli/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
*.log
|
||||
.DS_Store
|
||||
node_modules
|
||||
.rts2_cache_cjs
|
||||
.rts2_cache_esm
|
||||
.rts2_cache_umd
|
||||
.rts2_cache_system
|
||||
dist
|
||||
44
packages/cli/package.json
Normal file
44
packages/cli/package.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "@blitzjs/cli",
|
||||
"description": "Framework for building monolithic, full-stack, serverless React apps with zero data-fetching and zero client-side state management",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"yarn": "^1.19.1",
|
||||
"node": ">=12.16.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/blitz-js/blitz"
|
||||
},
|
||||
"author": {
|
||||
"name": "Brandon Bayer",
|
||||
"email": "b@bayer.ws",
|
||||
"url": "https://twitter.com/flybayer"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Michael Edelman",
|
||||
"email": "michael@fabulas.io",
|
||||
"url": "https://twitter.com/edelman215"
|
||||
}
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/testtsdx.esm.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "tsdx watch",
|
||||
"build": "tsdx build",
|
||||
"test": "tsdx test",
|
||||
"lint": "tsdx lint"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "tsdx lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
6
packages/cli/src/index.ts
Normal file
6
packages/cli/src/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export const sum = (a: number, b: number) => {
|
||||
if ('development' === process.env.NODE_ENV) {
|
||||
console.log('boop');
|
||||
}
|
||||
return a + b;
|
||||
};
|
||||
7
packages/cli/test/blah.test.ts
Normal file
7
packages/cli/test/blah.test.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { sum } from '../src';
|
||||
|
||||
describe('blah', () => {
|
||||
it('works', () => {
|
||||
expect(sum(1, 1)).toEqual(2);
|
||||
});
|
||||
});
|
||||
10
packages/cli/tsconfig.json
Normal file
10
packages/cli/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["src", "types", "test"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"*": ["src/*", "node_modules/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
8
packages/core/.gitignore
vendored
Normal file
8
packages/core/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
*.log
|
||||
.DS_Store
|
||||
node_modules
|
||||
.rts2_cache_cjs
|
||||
.rts2_cache_esm
|
||||
.rts2_cache_umd
|
||||
.rts2_cache_system
|
||||
dist
|
||||
44
packages/core/package.json
Normal file
44
packages/core/package.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "@blitzjs/core",
|
||||
"description": "Framework for building monolithic, full-stack, serverless React apps with zero data-fetching and zero client-side state management",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"yarn": "^1.19.1",
|
||||
"node": ">=12.16.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/blitz-js/blitz"
|
||||
},
|
||||
"author": {
|
||||
"name": "Brandon Bayer",
|
||||
"email": "b@bayer.ws",
|
||||
"url": "https://twitter.com/flybayer"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Michael Edelman",
|
||||
"email": "michael@fabulas.io",
|
||||
"url": "https://twitter.com/edelman215"
|
||||
}
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/testtsdx.esm.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "tsdx watch",
|
||||
"build": "tsdx build",
|
||||
"test": "tsdx test",
|
||||
"lint": "tsdx lint"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "tsdx lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
6
packages/core/src/index.ts
Normal file
6
packages/core/src/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export const sum = (a: number, b: number) => {
|
||||
if ('development' === process.env.NODE_ENV) {
|
||||
console.log('boop');
|
||||
}
|
||||
return a + b;
|
||||
};
|
||||
7
packages/core/test/blah.test.ts
Normal file
7
packages/core/test/blah.test.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { sum } from '../src';
|
||||
|
||||
describe('blah', () => {
|
||||
it('works', () => {
|
||||
expect(sum(1, 1)).toEqual(2);
|
||||
});
|
||||
});
|
||||
10
packages/core/tsconfig.json
Normal file
10
packages/core/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["src", "types", "test"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"*": ["src/*", "node_modules/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
6
prettier.config.js
Normal file
6
prettier.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
bracketSpacing: false,
|
||||
jsxBracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: "all"
|
||||
};
|
||||
0
tsconfig.build.json
Normal file
0
tsconfig.build.json
Normal file
25
tsconfig.json
Normal file
25
tsconfig.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"lib": ["dom", "esnext"],
|
||||
"importHelpers": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"rootDir": "./",
|
||||
"strict": true,
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictPropertyInitialization": true,
|
||||
"noImplicitThis": true,
|
||||
"alwaysStrict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"moduleResolution": "node",
|
||||
"jsx": "react",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user