Skip to content

Commit

Permalink
build: add lerna and move build deps to root
Browse files Browse the repository at this point in the history
This adds the `lerna` package, and moves all build dependencies to the
root package.json.
  • Loading branch information
bartlangelaan committed Mar 23, 2018
1 parent 438a32a commit 1db6377
Show file tree
Hide file tree
Showing 9 changed files with 5,717 additions and 4,663 deletions.
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@ branches:
except:
- /^v\d+\.\d+\.\d+$/

install:
- cd packages/hn
- yarn
- cd ../..

script:
- cd packages/hn
- yarn build
- yarn lint
- yarn test
- cat ./coverage/lcov.info | yarn coveralls
- cd ../..

after_success:
- cd packages/hn
Expand Down
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"lerna": "2.9.0",
"packages": ["packages/*"],
"version": "0.0.0",
"npmClient": "yarn"
}
48 changes: 48 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"private": true,
"devDependencies": {
"@types/jest": "^22.2.2",
"@types/node": "^9.6.0",
"babel-jest": "^22.4.3",
"coveralls": "^2.13.1",
"fetch-mock": "^5.12.1",
"jest": "^22.4.3",
"lerna": "^2.9.0",
"prettier": "^1.11.1",
"rimraf": "^2.6.2",
"semantic-release": "^8.0.3",
"ts-jest": "^22.4.2",
"ts-node": "^3.3.0",
"tslint": "^5.5.0",
"tslint-config-airbnb": "^5.2.1",
"tslint-config-prettier": "^1.10.0",
"tslint-react": "^3.5.1",
"typescript": "^2.4.2"
},
"scripts": {
"build": "rimraf packages/hn/lib && tsc",
"test": "jest --coverage",
"start": "yarn build -- --watch",
"lint":
"prettier 'packages/**/src/**/*.{js,ts,tsx}' -l && tslint 'packages/**/src/**/*.{js,ts,tsx}'",
"lint:fix":
"prettier 'packages/**/src/**/*.{js,ts,tsx}' --write -l && tslint 'packages/**/src/**/*.{js,ts,tsx}' --fix",
"postinstall": "lerna bootstrap"
},
"dependencies": {},
"jest": {
"collectCoverageFrom": ["packages/*/src/**/*.{js,ts,tsx}"],
"coverageReporters": ["lcov", "text"],
"transform": {
"^.+\\.(j|t)sx?$": "ts-jest"
},
"testRegex": "src/.*(__tests__/.*|(\\.|/)(test|spec))\\.(j|t)sx?$",
"moduleFileExtensions": ["ts", "tsx", "js", "json", "node"],
"projects": ["<rootDir>/packages/hn"]
},
"prettier": {
"printWidth": 80,
"singleQuote": true,
"trailingComma": "all"
}
}
194 changes: 194 additions & 0 deletions packages/hn/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 1 addition & 44 deletions packages/hn/package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
{
"name": "hn",
"version": "0.0.0-development",
"description":
"Connects with an Drupal website that has the hn module installed.",
"description": "Connects with an Drupal website that has the hn module installed.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"repository": {
"url": "https://github.com/burst-digital/hn"
},
"author": "Bart Langelaan",
"license": "MIT",
"devDependencies": {
"@types/jest": "^22.2.2",
"@types/node": "^9.6.0",
"babel-jest": "^22.4.3",
"coveralls": "^2.13.1",
"fetch-mock": "^5.12.1",
"jest": "^22.4.3",
"prettier": "^1.11.1",
"semantic-release": "^8.0.3",
"ts-jest": "^22.4.2",
"ts-node": "^3.3.0",
"tslint": "^5.5.0",
"tslint-config-airbnb": "^5.2.1",
"tslint-config-prettier": "^1.10.0",
"tslint-react": "^3.5.1",
"typescript": "^2.4.2"
},
"scripts": {
"build": "rimraf lib && tsc",
"test": "jest --coverage",
"start": "yarn build -- --watch",
"lint":
"prettier 'src/**/*.{js,ts,tsx}' -l && tslint 'src/**/*.{js,ts,tsx}'",
"lint:fix":
"prettier 'src/**/*.{js,ts,tsx}' --write -l && tslint 'src/**/*.{js,ts,tsx}' --fix",
"semantic-release":
"semantic-release pre && npm publish && semantic-release post"
},
"dependencies": {
"deepmerge": "^1.5.0",
"es6-promise": "^4.1.1",
Expand All @@ -47,19 +18,5 @@
"query-string": "^5.0.0",
"rimraf": "^2.6.2",
"universal-fetch": "^1.0.0"
},
"jest": {
"collectCoverageFrom": ["src/**/*.{js,ts,tsx}"],
"coverageReporters": ["lcov", "text"],
"transform": {
"^.+\\.(j|t)sx?$": "ts-jest"
},
"testRegex": "src/.*(__tests__/.*|(\\.|/)(test|spec))\\.(j|t)sx?$",
"moduleFileExtensions": ["ts", "tsx", "js", "json", "node"]
},
"prettier": {
"printWidth": 80,
"singleQuote": true,
"trailingComma": "all"
}
}

0 comments on commit 1db6377

Please sign in to comment.