Skip to content

Commit d81b97c

Browse files
authored
Add Lerna (OctoLinker#433)
* Add lerna setup * Move lib into octolinker-core package * Add missing package.json for blob-reader * Lernafiy byline-parser package * Lernafiy grammar-regex package * Fix import paths * Add missing package.json for octolinker-core * Update build paths * Remove not longer needed octolinker-core dependencies * Remove version field from root package.json file * Move core dep into core package * Merge root devDependencies * Make eslint working with mono repo
1 parent befe3c5 commit d81b97c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+840
-382
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
dist/
2+
packages/**/node_modules

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports = {
3030
'no-prototype-builtins': 0,
3131
'import/extensions': 0,
3232
'import/prefer-default-export': 0,
33+
'import/no-extraneous-dependencies': 0,
3334
'no-underscore-dangle': 0,
3435
'no-useless-escape': 0,
3536
'class-methods-use-this': 0,

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
npm-debug.log
3+
lerna-debug.log
34

45
dist/
56
out/

lerna.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.0.0",
3+
"lerna": "2.7.0",
4+
"packages": [
5+
"packages/*"
6+
],
7+
"npmClient": "yarn",
8+
"npmClientArgs": [
9+
"--no-lockfile"
10+
]
11+
}

package.json

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "OctoLinker",
3-
"version": "4.15.1",
43
"engines": {
54
"node": ">=8.0.0"
65
},
@@ -9,6 +8,7 @@
98
"lint": "eslint .",
109
"pretest": "yarn lint",
1110
"test": "jest",
11+
"postinstall": "yarn lerna bootstrap",
1212
"test:watch": "jest --watch",
1313
"version": "json -I -f assets/manifest.json -e \"this.version='`json -f package.json version`'\" && git add assets/manifest.json",
1414
"package": "yarn build && web-ext build --source-dir dist --artifacts-dir out --overwrite-dest",
@@ -25,55 +25,33 @@
2525
"./_jestsetup.js"
2626
]
2727
},
28-
"dependencies": {
29-
"JSONPath": "^0.11.2",
30-
"babel-preset-env": "^1.6.1",
31-
"babel-preset-jest": "^22.0.3",
32-
"builtins": "^1.0.3",
33-
"chrome-promise": "^2.1.1",
34-
"concat-map": "^0.0.1",
35-
"css-loader": "^0.28.7",
36-
"escape-regex-string": "^1.0.4",
37-
"eslint-config-airbnb": "^16.0.0",
38-
"eslint-plugin-react": "^7.4.0",
39-
"findandreplacedomtext": "^0.4.5",
40-
"github-injection": "^1.0.1",
41-
"github-url-from-git": "^1.5.0",
42-
"github-url-from-username-repo": "^1.0.2",
43-
"giturl": "^1.0.0",
44-
"jest": "^22.0.4",
45-
"jquery": "^3.2.1",
46-
"linkstate": "^1.1.0",
47-
"path-parse": "^1.0.5",
48-
"preact": "^8.2.5",
49-
"primer-core": "^6.4.0",
50-
"primer-forms": "^1.4.0",
51-
"querystring": "^0.2.0",
52-
"semver": "^5.4.1",
53-
"semver-regex": "^1.0.0",
54-
"style-loader": "^0.19.0",
55-
"uuid": "^3.1.0",
56-
"xregexp": "^4.0.0"
57-
},
5828
"devDependencies": {
5929
"babel-core": "^6.26.0",
6030
"babel-loader": "^7.1.2",
6131
"babel-plugin-transform-object-rest-spread": "^6.26.0",
6232
"babel-plugin-transform-react-jsx": "^6.24.1",
33+
"babel-preset-env": "^1.6.1",
34+
"babel-preset-jest": "^22.0.3",
6335
"chrome-launch": "^1.1.4",
6436
"chrome-webstore-upload-cli": "^1.1.1",
6537
"copy-webpack-plugin": "^4.1.0",
38+
"css-loader": "^0.28.7",
6639
"eslint": "^4.8.0",
40+
"eslint-config-airbnb": "^16.0.0",
6741
"eslint-config-prettier": "^2.6.0",
6842
"eslint-plugin-import": "^2.7.0",
6943
"eslint-plugin-jsx-a11y": "^6.0.2",
7044
"eslint-plugin-prettier": "^2.3.1",
45+
"eslint-plugin-react": "^7.4.0",
46+
"jest": "^22.0.6",
7147
"json": "^9.0.4",
7248
"json-loader": "^0.5.7",
49+
"lerna": "^2.7.0",
7350
"mkdirp": "^0.5.1",
7451
"npm-run-all": "^4.1.1",
7552
"prettier": "^1.7.4",
7653
"sinon": "^4.0.1",
54+
"style-loader": "^0.19.0",
7755
"web-ext": "^2.0.0",
7856
"webpack": "^3.6.0"
7957
},

packages/blob-reader/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "@octolinker/blob-reader",
3+
"version": "1.0.0",
4+
"description": "This provides a unified interface for GitHubs blob view",
5+
"repository": "https://github.com/octolinker/octolinker/tree/master/packages/blob-reader",
6+
"license": "MIT",
7+
"main": "./index.js",
8+
"dependencies": {
9+
"jquery": "^3.2.1"
10+
}
11+
}

lib/__tests__/__snapshots__/insert-link.test.js.snap renamed to packages/core/__tests__/__snapshots__/insert-link.test.js.snap

File renamed without changes.
File renamed without changes.

lib/__tests__/insert-link.test.js renamed to packages/core/__tests__/insert-link.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { REQUIRE } from '@octolinker/helper-grammar-regex-collection';
12
import insertLink from '../insert-link.js';
2-
import { REQUIRE } from '../../packages/helper-grammar-regex-collection';
33

44
describe('insert-link', () => {
55
const DEFAULT_REGEX = /foo ("\w+")/;
File renamed without changes.

0 commit comments

Comments
 (0)