Skip to content

Commit

Permalink
fix: undo using composite projects
Browse files Browse the repository at this point in the history
to restore testing functionality
  • Loading branch information
emirotin committed Aug 11, 2018
1 parent 4b393ae commit a895f21
Show file tree
Hide file tree
Showing 12 changed files with 165 additions and 304 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -4,5 +4,5 @@ TODO

## Setup and run all modules

1. Install [Lerna](https://lernajs.io/) to manage multiple npm packages: `npm install -g lerna` or `yarn global add lerna`
1. Run `yarn dev` or `npm run dev`. This will install dependencies, link the module-sdk and start the project in watch mode
1. Run `yarn install` once
1. Run `yarn dev` to start working. This will install dependencies, link the modules and start the project in watch mode
8 changes: 4 additions & 4 deletions jest.config.js
Expand Up @@ -3,14 +3,14 @@ const process = require('process')
module.exports = {
globals: {
'ts-jest': {
tsConfigFile: 'tsconfig.json'
tsConfigFile: '<rootDir>/tsconfig.json'
}
},
moduleFileExtensions: ['ts', 'js'],
moduleFileExtensions: ['ts', 'js', 'tsx', 'jsx', 'json'],
transform: {
'^.+\\.(ts|tsx)$': '../../node_modules/ts-jest/preprocessor.js'
'^.+\\.(ts|tsx)$': 'ts-jest'
},
testMatch: ['**/test/**/*.test.(ts|js)'],
testMatch: ['<rootDir>/test/**/*.test.(ts|js)'],
testEnvironment: 'node',
rootDir: process.cwd()
}
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -12,11 +12,13 @@
"pkg": "^4.3.3",
"prettier": "^1.13.7",
"rimraf": "^2.6.2",
"ts-jest": "^23.0.0",
"ts-jest": "^23.1.3",
"ts-node": "^7.0.0",
"tsc-watch": "^1.0.26",
"tslint": "^5.11.0",
"typescript": "^3.0.1"
"typescript": "^2.7.0",
"babel-core": "^6.26.0",
"babel-jest": "^23.4.2"
},
"dependencies": {},
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions packages/channel-web/tsconfig.json
Expand Up @@ -6,6 +6,5 @@
"rootDir": ".",
"types": ["bluebird-global"]
},
"include": ["src/**/*"],
"references": [{ "path": "../../packages/module-sdk" }]
"include": ["src/**/*"]
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Expand Up @@ -9,7 +9,7 @@
"start": "npm run serve",
"serve": "node dist/src/app.js",
"build": "npm run tslint && npm run build-ts && ./scripts/copy-config.sh",
"build-ts": "../../node_modules/.bin/rimraf dist && ../../node_modules/.bin/tsc -b .",
"build-ts": "../../node_modules/.bin/rimraf dist && ../../node_modules/.bin/tsc",
"build-pkg": "npm run build && npm run pkg",
"pkg": "./scripts/package-binaries.sh",
"test": "../../node_modules/.bin/jest --forceExit --coverage --verbose -c ../../jest.config.js",
Expand Down
5 changes: 5 additions & 0 deletions packages/core/test/testing.test.ts
@@ -0,0 +1,5 @@
describe('Testing a test', () => {
it('should be true', () => {
expect(true).toBeTruthy()
})
})
4 changes: 1 addition & 3 deletions packages/core/tsconfig.json
Expand Up @@ -6,7 +6,5 @@
"rootDir": ".",
"types": ["bluebird-global", "reflect-metadata"]
},
"include": ["src/**/*"],
"files": ["package.json"],
"references": [{ "path": "../../packages/module-sdk" }]
"include": ["src/**/*"]
}
1 change: 1 addition & 0 deletions packages/module-sdk/package.json
Expand Up @@ -4,6 +4,7 @@
"author": "Botpress",
"license": "AGPL-3.0-only",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"private": true,
"scripts": {
"build": "npm run tslint && npm run build-ts",
Expand Down
8 changes: 4 additions & 4 deletions packages/module-sdk/yarn.lock
Expand Up @@ -3,9 +3,9 @@


"@types/jest@^23.3.0":
version "23.3.0"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.0.tgz#5dd70033b616a6228042244ebd992f6426808810"
version "23.3.1"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.1.tgz#a4319aedb071d478e6f407d1c4578ec8156829cf"

"@types/node@^10.5.2":
version "10.5.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.2.tgz#f19f05314d5421fe37e74153254201a7bf00a707"
version "10.5.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.7.tgz#960d9feb3ade2233bcc9843c918d740b4f78a7cf"
3 changes: 1 addition & 2 deletions tsconfig.json
@@ -1,4 +1,3 @@
{
"files": [],
"references": [{ "path": "botpress-module-sdk" }, { "path": "botpress-xx" }, { "path": "@botpress/xx-channel-web" }]
"files": []
}
1 change: 0 additions & 1 deletion tsconfig.settings.json
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"composite": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
Expand Down

0 comments on commit a895f21

Please sign in to comment.