Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

/tests/e2e/videos/
/tests/e2e/screenshots/

.DS_Store
lerna-debug.log
node_modules
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ cache:
# we also need to cache folder with Cypress binary
- ~/.cache
install:
- yarn install
- npm install -g lerna
- yarn run setup
script:
- yarn run build
- yarn run ci:unit
- yarn run ci:e2e

1 change: 0 additions & 1 deletion deploy
Submodule deploy deleted from 278845
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": "0.0.0",
"npmClient": "yarn"
}
90 changes: 5 additions & 85 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,92 +1,12 @@
{
"name": "i-just-crashed-my-plane",
"version": "0.1.0",
"name": "root",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"docs:generate": "npx typedoc --out docs src",
"ci:e2e:start-server": "yarn serve",
"ci:e2e:run": "cypress run --record --key 4985f51e-046b-4590-b6e3-f124c50cc39c",
"ci:e2e": "npx start-server-and-test ci:e2e:start-server 8080 ci:e2e:run",
"ci:unit": "yarn run test:unit"
},
"dependencies": {
"@bugsnag/js": "^7.1.0",
"@bugsnag/plugin-vue": "^7.1.0",
"cldr-data": "^36.0.0",
"cldrjs": "^0.5.1",
"core-js": "^3.6.5",
"lodash-es": "^4.17.15",
"normalize.css": "^8.0.1",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-i18n": "^8.17.7",
"vue-property-decorator": "^8.4.2",
"vuex": "^3.4.0",
"vuex-class": "^0.3.2"
"setup": "lerna bootstrap",
"build": "lerna run build",
"serve": "lerna run serve --parallel"
},
"devDependencies": {
"@cypress/webpack-preprocessor": "^5.4.1",
"@types/chai": "^4.2.11",
"@types/chai-as-promised": "^7.1.2",
"@types/cldrjs": "^0.4.22",
"@types/lodash-es": "^4.17.3",
"@types/mocha": "^7.0.2",
"@typescript-eslint/eslint-plugin": "^3.0.1",
"@typescript-eslint/parser": "^3.0.1",
"@vue/cli-plugin-babel": "~4.3.1",
"@vue/cli-plugin-e2e-cypress": "~4.3.1",
"@vue/cli-plugin-eslint": "~4.3.1",
"@vue/cli-plugin-router": "~4.3.1",
"@vue/cli-plugin-typescript": "^4.3.1",
"@vue/cli-plugin-unit-mocha": "~4.3.1",
"@vue/cli-plugin-vuex": "~4.3.1",
"@vue/cli-service": "~4.3.1",
"@vue/eslint-config-airbnb": "^5.0.2",
"@vue/eslint-config-typescript": "^5.0.2",
"@vue/test-utils": "1.0.3",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"chai-each": "^0.0.1",
"eslint": "^7.1.0",
"eslint-plugin-chai-expect": "^2.1.0",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-mocha": "^7.0.0",
"eslint-plugin-vue": "^6.2.2",
"lint-staged": "^10.2.6",
"null-loader": "^4.0.0",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"start-server-and-test": "^1.11.0",
"stylelint": "^13.5.0",
"stylelint-config-sass-guidelines": "^7.0.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-processor-html": "^1.0.0",
"typedoc": "^0.17.7",
"typescript": "~3.9.3",
"vue-template-compiler": "^2.6.11"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"vue-cli-service lint --fix"
],
"*.{css,vue}": [
"npx stylelint --fix"
],
"*.scss": [
"npx stylelint --fix --syntax scss"
],
"*.sass": [
"npx stylelint --fix --syntax sass"
]
"lerna": "^3.22.0"
}
}
1 change: 1 addition & 0 deletions packages/survey/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
36 changes: 36 additions & 0 deletions packages/survey/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "i-just-crashed-my-plane-survey",
"version": "0.1.0",
"main": "dist/index.js",
"license": "MIT",
"private": true,
"scripts": {
"build": "tsc",
"serve": "tsc -w"
},
"dependencies": {
"lodash-es": "^4.17.15"
},
"devDependencies": {
"@types/lodash-es": "^4.17.3",
"typedoc": "^0.17.7",
"typescript": "~3.9.3"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"vue-cli-service lint --fix"
],
"*.{css,vue}": [
"npx stylelint --fix"
],
"*.scss": [
"npx stylelint --fix --syntax scss"
],
"*.sass": [
"npx stylelint --fix --syntax sass"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import profileSurvey from '@/data/surveys/profile'
import incidentSurvey from '@/data/surveys/incident'
import profileSurvey from './surveys/profile'
import incidentSurvey from './surveys/incident'

/** The order to present {@link Survey}s to the user. */

Expand Down
6 changes: 3 additions & 3 deletions src/data/surveys.ts → packages/survey/src/data/surveys.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Survey from '@/models/survey'
import profileSurvey from '@/data/surveys/profile'
import incidentSurvey from '@/data/surveys/incident'
import Survey from '../models/survey'
import profileSurvey from './surveys/profile'
import incidentSurvey from './surveys/incident'

/** A dictionary of all {@link Survey}s, keyed by their identifier. */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
noMeansAccidentYesMeansIncident, noMeansSeriousIncidentYesMeansIncident, yesAskQuestion,
yesMeansIncident, yesMeansAccidentNoMeansIncident, yesMeansSeriousIncidentNoMeansIncident,
classifyAsIncident
} from '@/data/surveys/incidentSurveyShorthand'
} from './incidentSurveyShorthand'
import Survey, {
Flag, Option, Question, QuestionAction
} from '@/models/survey'
} from '../../models/survey'

const incidentSurvey = new Survey('incident',
new Question('root', [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
IncidentLevel, LevelAction, Option, Question, QuestionAction
} from '@/models/survey'
} from '../../models/survey'

export const classifyAsAccident = new LevelAction(IncidentLevel.ACCIDENT)
export const classifyAsSeriousIncident = new LevelAction(IncidentLevel.SERIOUS_INCIDENT)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Survey, {
Flag, FlagAction, Option, Question
} from '@/models/survey'
} from '../../models/survey'

const profileSurvey = new Survey('profile',
new Question('root', [
Expand Down
13 changes: 13 additions & 0 deletions packages/survey/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export * from "./models/survey/index";
export * from "./models/survey/stackTraverser";
export * from "./models/survey/traverser";
export * from "./data/surveys/incidentSurveyShorthand";

export { default as Survey } from "./models/survey/index";
export { default as SurveyStackTraverser } from "./models/survey/stackTraverser";
export { default as SurveyTraverser } from "./models/survey/traverser";
export { default as surveys } from "./data/surveys";
export { default as surveyOrder } from "./data/surveyOrder";
export { default as incidentSurvey } from "./data/surveys/incident";
export { default as profileSurvey } from "./data/surveys/profile";

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/no-cycle */

import Survey, { SurveyNode } from '@/models/survey/index'
import SurveyTraverser from '@/models/survey/traverser'
import Survey, { SurveyNode } from './index'
import SurveyTraverser from './traverser'

/**
* Interface for the callback receiver, used when traversing a {@link Survey} with a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Survey, {
Option,
Question,
QuestionAction
} from '@/models/survey/index'
} from './index'

/**
* Interface for the callback receiver, used when traversing a {@link Survey} with a
Expand Down
31 changes: 31 additions & 0 deletions packages/survey/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"outDir": "dist/",
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
],
"declaration": true,
},
"include": [
"src/**/*.ts",
"tests/unit/**/*.ts",
],
"exclude": [
"node_modules"
]
}
11 changes: 11 additions & 0 deletions packages/survey/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"inputFiles": ["./src"],
"mode": "modules",
"out": "./docs",
"excludeExternals": true,
"excludePrivate": true,
"readme": "README.md",
"exclude": ["./src/data"],
"name": "I Just Crashed My Plane Survey",
"excludeNotDocumented": true
}
Loading