Skip to content

Commit

Permalink
Converts app to same build setup as floweditor
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jul 24, 2019
1 parent 9980249 commit 1a9d15f
Show file tree
Hide file tree
Showing 12 changed files with 10,355 additions and 12,414 deletions.
12,363 changes: 0 additions & 12,363 deletions package-lock.json

This file was deleted.

68 changes: 54 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,67 @@
{
"name": "sexplainer",
"version": "0.1.0",
"license": "AGPL-3.0",
"repository": "git://github.com/nyaruka/sessionexplain.git",
"version": "0.2.0",
"private": true,
"dependencies": {
"react": "^16.6.0",
"react-dom": "^16.6.0",
"react-scripts-ts": "3.1.0"
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"scripts": {
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject"
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"prettify": "prettier --write 'src/**/*.{ts,tsx,json,js,css,md}'"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{ts,tsx}"
],
"coverageReporters": [
"text",
"lcov",
"json"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
},
"lint-staged": {
"*.{ts,tsx,js,css,md}": [
"prettier --write",
"git add"
]
},
"devDependencies": {
"@types/enzyme": "^3.1.14",
"@types/enzyme-adapter-react-16": "^1.0.3",
"@types/enzyme": "^3.10.3",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/jest": "^23.3.7",
"@types/node": "^10.12.0",
"@types/react": "^16.4.18",
"@types/react-dom": "^16.0.9",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
"typescript": "^3.1.3"
"enzyme": "3.9.0",
"enzyme-adapter-react-16": "^1.13.0",
"enzyme-adapter-utils": "1.12.0",
"enzyme-to-json": "^3.3.4",
"prettier": "1.18.2",
"react-scripts": "3.0.1",
"tslint": "5.17.0",
"tslint-config-prettier": "1.18.0",
"tslint-plugin-prettier": "2.0.1",
"typescript": "^3.4.5"
}
}
}
2 changes: 1 addition & 1 deletion src/components/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import './Timeline.css';

import { ExplainFrame, URLResolver } from 'src/utils/Explain';
import { ExplainFrame, URLResolver } from 'utils/Explain';
import { TimelineFrame } from './TimelineFrame';

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/components/TimelineEvent.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { TimelineEvent } from './TimelineEvent';
import { mount, configure } from 'enzyme';
import * as ReactSixteenAdapter from 'enzyme-adapter-react-16';
import ReactSixteenAdapter from 'enzyme-adapter-react-16';

configure({ adapter: new ReactSixteenAdapter() });

Expand Down
2 changes: 1 addition & 1 deletion src/components/TimelineEvent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Event } from 'src/utils/GoFlow';
import { Event } from 'utils/GoFlow';

interface Props {
event: Event;
Expand Down
2 changes: 1 addition & 1 deletion src/components/TimelineFrame.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { TimelineStep } from './TimelineStep';
import { ExplainFrame, URLResolver } from 'src/utils/Explain';
import { ExplainFrame, URLResolver } from 'utils/Explain';

interface Props {
frame: ExplainFrame;
Expand Down
2 changes: 1 addition & 1 deletion src/components/TimelineStep.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { TimelineEvent } from './TimelineEvent';
import { ExplainStep } from 'src/utils/Explain';
import { ExplainStep } from 'utils/Explain';

interface Props {
step: ExplainStep;
Expand Down
16 changes: 8 additions & 8 deletions src/components/TriggerInfo.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { TriggerInfo } from './TriggerInfo';
import { mount, configure } from 'enzyme';
import * as ReactSixteenAdapter from 'enzyme-adapter-react-16';
import ReactSixteenAdapter from 'enzyme-adapter-react-16';

configure({ adapter: new ReactSixteenAdapter() });

Expand All @@ -15,7 +15,7 @@ it('renders appropriate summary for different trigger types', () => {
campaign: { "uuid": "58e9b092-fe42-4173-876c-ff45a14a24fe", "name": "New Mothers" }
}
},
summary: "📅 started by event in New Mothers campaign"
summary: "📅 started by event in New Mothers campaign"
},
{
trigger: {
Expand All @@ -25,25 +25,25 @@ it('renders appropriate summary for different trigger types', () => {
channel: { uuid: "58e9b092-fe42-4173-876c-ff45a14a24fe", name: "Facebook" }
}
},
summary: "📻 started by new_conversation event on Facebook channel"
summary: "📻 started by new_conversation event on Facebook channel"
},
{
trigger: {
type: "flow_action"
},
summary: "🏁 started by action in another flow session"
summary: "🏁 started by action in another flow session"
},
{
trigger: {
type: "manual"
},
summary: "👷 manually started"
summary: "👷 manually started"
},
{
trigger: {
type: "msg"
},
summary: "📥 message received that didn't match anything else"
summary: "📥 message received that didn't match anything else"
},
{
trigger: {
Expand All @@ -53,7 +53,7 @@ it('renders appropriate summary for different trigger types', () => {
keyword: "start"
}
},
summary: "📥 message received whose first word matched start"
summary: "📥 message received whose first word matched start"
},
{
trigger: {
Expand All @@ -63,7 +63,7 @@ it('renders appropriate summary for different trigger types', () => {
keyword: "start"
}
},
summary: "📥 message received whose only word matched start"
summary: "📥 message received whose only word matched start"
}
];

Expand Down
2 changes: 1 addition & 1 deletion src/components/TriggerInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Trigger } from 'src/utils/GoFlow';
import { Trigger } from 'utils/GoFlow';
import './TriggerInfo.css';

interface Props {
Expand Down
1 change: 1 addition & 0 deletions src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="react-scripts" />
52 changes: 29 additions & 23 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "build/dist",
"module": "esnext",
"baseUrl": "src",
"target": "es5",
"lib": ["es6", "dom"],
"sourceMap": true,
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"plugins": [
{
"name": "typescript-tslint-plugin"
}
],
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"rootDir": "src",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"importHelpers": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true
"module": "esnext",
"moduleResolution": "node",
"downlevelIteration": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"strictNullChecks": false,
"resolveJsonModule": true
},
"include": [
"src"
],
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
"node_modules"
]
}
}
Loading

0 comments on commit 1a9d15f

Please sign in to comment.