Skip to content

Commit

Permalink
Migrate to multi-project mono-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
nateabele committed Jan 5, 2019
1 parent 17e9680 commit ba07b2b
Show file tree
Hide file tree
Showing 46 changed files with 173 additions and 160 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
node_modules
dist
packages/core/node_modules
packages/core/dist
packages/core/coverage
packages/core/.nyc_output
.tmp
.vscode
.idea
coverage
.nyc_output
.DS_Store
7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"packages": [
"packages/*"
],
"version": "independent",
"npmClient": "yarn"
}
79 changes: 3 additions & 76 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,7 @@
{
"name": "casium",
"version": "2.2.1",
"description": "Casium — An application architecture for React",
"module": "./index.js",
"browser": "dist/casium.umd.js",
"types": "./index.d.ts",
"repository": "https://github.com/ai-labs-team/casium.git",
"author": "Nate Abele <[email protected]>",
"license": "Apache-2.0",
"scripts": {
"peers": "install-self-peers -- --ignore-scripts",
"build": "yarn peers; rm -r ./dist; tsc; cp package.json ./dist; cp README.md ./dist; rollup -c; yarn docs",
"docs": "typedoc --json dist/api.json --mode modules --tsconfig tdconfig.json",
"lint": "NODE_ENV=test tslint -c tslint.json --format stylish \"src/**/*.{js,ts,jsx,tsx}\"",
"test": "./run.sh 'npm run lint' 'npm run unit-test'",
"dev": "nodemon -e ts,tsx --exec yarn unit-test",
"unit-test": "nyc mocha -r test/setup.js --opts test/mocha.opts",
"debug-tests": "mocha -r test/setup.js --opts test/mocha.opts --inspect-brk"
},
"name": "root",
"private": true,
"devDependencies": {
"@babel/core": "^7.0.0",
"@team-griffin/install-self-peers": "^1.1.1",
"@types/chai": "4.1.6",
"@types/enzyme": "3.1.14",
"@types/mocha": "5.2.5",
"@types/ramda": "types/npm-ramda",
"@types/react": "16.4.7",
"chai": "4.2.0",
"chai-enzyme": "1.0.0-beta.1",
"cheerio": "1.0.0-rc.2",
"enzyme": "3.7.0",
"enzyme-adapter-react-16": "1.6.0",
"jsdom": "12.2.0",
"jsdom-global": "3.0.2",
"jss": "9.8.7",
"mocha": "5.2.0",
"nodemon": "1.18.4",
"nyc": "13.0.1",
"react-addons-test-utils": "15.6.2",
"react-dom": "16.5.2",
"react-test-renderer": "16.5.2",
"rollup": "^0.66.6",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-config-airbnb": "^5.11.0",
"typedoc": "^0.13.0",
"typescript": "^3.1.3",
"url-parse": "1.4.3"
},
"peerDependencies": {
"axios": "^0.16.0 || ^0.17.0 || ^0.18.0",
"deep-freeze-strict": "^1.1.0",
"js-cookie": "^2.1.4",
"prop-types": "^15.0.0-0 || ^16.0.0-0",
"ramda": "^0.25.0",
"react": "^16.2.0"
},
"nyc": {
"include": [
"src/**/*.{ts,tsx}"
],
"exclude": [
"**/*_test.{ts,tsx}",
"src/effects/*.{ts,tsx}",
"src/components/error.tsx"
],
"extension": [
".ts",
".tsx"
],
"reporter": [
"text-summary",
"html",
"lcov"
]
"lerna": "^3.8.5"
}
}
80 changes: 80 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"name": "casium",
"version": "3.0.0",
"description": "Casium — An application architecture for React",
"module": "./index.js",
"browser": "dist/casium.umd.js",
"types": "./index.d.ts",
"repository": "https://github.com/ai-labs-team/casium.git",
"author": "Nate Abele <[email protected]>",
"license": "Apache-2.0",
"scripts": {
"peers": "install-self-peers -- --ignore-scripts",
"build": "yarn peers; rm -r ./dist; tsc; cp package.json ./dist; cp README.md ./dist; rollup -c; yarn docs",
"docs": "typedoc --json dist/api.json --mode modules --tsconfig tdconfig.json",
"lint": "NODE_ENV=test tslint -c tslint.json --format stylish \"src/**/*.{js,ts,jsx,tsx}\"",
"test": "./run.sh 'npm run lint' 'npm run unit-test'",
"dev": "nodemon -e ts,tsx --exec yarn unit-test",
"unit-test": "nyc mocha -r test/setup.js --opts test/mocha.opts",
"debug-tests": "mocha -r test/setup.js --opts test/mocha.opts --inspect-brk"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@team-griffin/install-self-peers": "^1.1.1",
"@types/chai": "4.1.6",
"@types/enzyme": "3.1.14",
"@types/mocha": "5.2.5",
"@types/ramda": "types/npm-ramda",
"@types/react": "16.4.7",
"chai": "4.2.0",
"chai-enzyme": "1.0.0-beta.1",
"cheerio": "1.0.0-rc.2",
"enzyme": "3.7.0",
"enzyme-adapter-react-16": "1.6.0",
"jsdom": "12.2.0",
"jsdom-global": "3.0.2",
"jss": "9.8.7",
"mocha": "5.2.0",
"nodemon": "1.18.4",
"nyc": "13.0.1",
"react-addons-test-utils": "15.6.2",
"react-dom": "16.5.2",
"react-test-renderer": "16.5.2",
"rollup": "^0.66.6",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-config-airbnb": "^5.11.0",
"typedoc": "^0.13.0",
"typescript": "^3.1.3",
"url-parse": "1.4.3"
},
"peerDependencies": {
"axios": "^0.16.0 || ^0.17.0 || ^0.18.0",
"deep-freeze-strict": "^1.1.0",
"js-cookie": "^2.1.4",
"prop-types": "^15.0.0-0 || ^16.0.0-0",
"ramda": "^0.25.0",
"react": "^16.2.0"
},
"nyc": {
"include": [
"src/**/*.{ts,tsx}"
],
"exclude": [
"**/*_test.{ts,tsx}",
"src/effects/*.{ts,tsx}",
"src/components/error.tsx"
],
"extension": [
".ts",
".tsx"
],
"reporter": [
"text-summary",
"html",
"lcov"
]
}
}
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.
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.
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.
File renamed without changes.
46 changes: 46 additions & 0 deletions packages/core/src/process.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import Message, { MessageConstructor } from './message';
import ExecContext from './runtime/exec_context';

export type State = '@process/running' | '@process/stopped';

export const RUNNING: State = '@process/running';
export const STOPPED: State = '@process/stopped';

// tslint:disable-next-line:variable-name
export const EffectType = Symbol.for('@effect/type');

export type Config = {
[EffectType]: MessageConstructor;
state: State;
context: ExecContext<any>;
data: Message[];
current: any;
set: (state: any) => any;
};

export abstract class Thread {

constructor(public data: any = {}) { }

public start(config: Message): void { }

public update(config: Message): void { }

public stop(): void { }
}

export class Snapshot {

public static RUNNING = RUNNING;
public static STOPPED = STOPPED;

public state: State = Snapshot.RUNNING;
public context: any;
public data: any;
public current: any;
public set: (state: any) => any;

constructor(data: Config) {
Object.assign(this, data);
}
}
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
56 changes: 33 additions & 23 deletions yarn.lock → packages/core/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@
"@types/node" "*"

"@types/handlebars@^4.0.38":
version "4.0.39"
resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.39.tgz#961fb54db68030890942e6aeffe9f93a957807bd"
integrity sha512-vjaS7Q0dVqFp85QhyPSZqDKnTTCemcSHNHFvDdalO1s0Ifz5KuE64jQD5xoUkfdWwF4WpqdJEl7LsWH8rzhKJA==
version "4.0.40"
resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.40.tgz#b714e13d296a75bff3f199316d1311933ca79ffd"
integrity sha512-sGWNtsjNrLOdKha2RV1UeF8+UbQnPSG7qbe5wwbni0mw4h2gHXyPFUMOC+xwGirIiiydM/HSqjDO4rk6NFB18w==

"@types/highlight.js@^9.12.3":
version "9.12.3"
resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca"
integrity sha512-pGF/zvYOACZ/gLGWdQH8zSwteQS1epp68yRcVLJMgUck/MjEn/FBYmPub9pXT8C1e4a8YZfHo1CKyV8q1vKUnQ==

"@types/lodash@^4.14.110":
version "4.14.117"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.117.tgz#695a7f514182771a1e0f4345d189052ee33c8778"
integrity sha512-xyf2m6tRbz8qQKcxYZa7PA4SllYcay+eh25DN3jmNYY6gSTL7Htc/bttVdkqj2wfJGbeWlQiX8pIyJpKU+tubw==
version "4.14.119"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.119.tgz#be847e5f4bc3e35e46d041c394ead8b603ad8b39"
integrity sha512-Z3TNyBL8Vd/M9D9Ms2S3LmFq2sSMzahodD6rCS9V2N44HUMINb75jNkSuwAx7eo2ufqTdfOdtGQpNbieUjPQmw==

"@types/marked@^0.4.0":
version "0.4.2"
Expand Down Expand Up @@ -341,9 +341,9 @@
csstype "^2.2.0"

"@types/shelljs@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632"
integrity sha512-vs1hCC8RxLHRu2bwumNyYRNrU3o8BtZhLysH5A4I98iYmA2APl6R3uNQb5ihl+WiwH0xdC9LLO+vRrXLs/Kyxg==
version "0.8.1"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.1.tgz#133e874b5fb816a2e1c8647839c82d76760b1191"
integrity sha512-1lQw+48BuVgp6c1+z8EMipp18IdnV2dLh6KQGwOm+kJy9nPjEkaqRKmwbDNEYf//EKBvKcwOC6V2cDrNxVoQeQ==
dependencies:
"@types/glob" "*"
"@types/node" "*"
Expand Down Expand Up @@ -1577,9 +1577,9 @@ from@^0.1.7:
integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=

fs-extra@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.0.tgz#8cc3f47ce07ef7b3593a11b9fb245f7e34c041d6"
integrity sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
Expand Down Expand Up @@ -1736,11 +1736,16 @@ got@^6.7.1:
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"

graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
graceful-fs@^4.1.11, graceful-fs@^4.1.2:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=

graceful-fs@^4.1.6:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==

[email protected]:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
Expand Down Expand Up @@ -1928,9 +1933,9 @@ ini@^1.3.4, ini@~1.3.0:
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==

interpret@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=
version "1.2.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==

invariant@^2.2.0:
version "2.2.4"
Expand Down Expand Up @@ -3292,9 +3297,9 @@ process-nextick-args@~2.0.0:
integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==

progress@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31"
integrity sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==
version "2.0.3"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==

prop-types@^15.6.2:
version "15.6.2"
Expand Down Expand Up @@ -3740,9 +3745,9 @@ shebang-regex@^1.0.0:
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=

shelljs@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35"
integrity sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==
version "0.8.3"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
Expand Down Expand Up @@ -4257,7 +4262,12 @@ typedoc@^0.13.0:
typedoc-default-themes "^0.5.0"
typescript "3.1.x"

[email protected], typescript@^3.1.3:
[email protected]:
version "3.1.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==

typescript@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.3.tgz#01b70247a6d3c2467f70c45795ef5ea18ce191d5"
integrity sha512-+81MUSyX+BaSo+u2RbozuQk/UWx6hfG0a5gHu4ANEM4sU96XbuIyAB+rWBW1u70c6a5QuZfuYICn3s2UjuHUpA==
Expand Down
30 changes: 0 additions & 30 deletions run.sh

This file was deleted.

Loading

0 comments on commit ba07b2b

Please sign in to comment.