Skip to content

Commit

Permalink
[CHORE] Fixes local linking
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Garrett authored and locks committed Apr 10, 2020
1 parent 1831af2 commit 5bf949b
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
settings: {
node: {
allowModules: ['@glimmer/debug', '@glimmer/local-debug-flags'],
tryExtensions: ['.js', '.ts', '.d.ts'],
tryExtensions: ['.js', '.ts', '.d.ts', '.json'],
},
},
ignorePatterns: ['dist', 'ts-dist', 'node_modules', 'tmp'],
Expand Down
25 changes: 25 additions & 0 deletions lib/local-linker/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

let fs = require('fs-extra');
let symlinkOrCopy = require('symlink-or-copy').sync;

let dir = `${__dirname}/../../dist`;

module.exports = {
name: require('./package').name,

isDevelopingAddon() {
return true;
},

preBuild() {
fs.removeSync(`${dir}/node_modules`);
},

outputReady() {
fs.mkdirsSync(`${dir}/@glimmer`);
fs.mkdirsSync(`${dir}/node_modules`);

symlinkOrCopy(`${dir}/@glimmer`, `${dir}/node_modules/@glimmer`);
},
};
10 changes: 10 additions & 0 deletions lib/local-linker/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "local-linker",
"keywords": [
"ember-addon"
],
"dependencies": {
"fs-extra": "*",
"symlink-or-copy": "*"
}
}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
"@simple-dom/serializer": "^1.4.0",
"@simple-dom/void-map": "^1.4.0",
"babel-plugin-debug-macros": "^0.3.3",
"fs-extra": "^9.0.0",
"handlebars": "^4.5.1",
"simple-html-tokenizer": "^0.5.9"
"simple-html-tokenizer": "^0.5.9",
"symlink-or-copy": "^1.3.1"
},
"devDependencies": {
"@babel/core": "^7.8.4",
Expand Down Expand Up @@ -141,5 +143,10 @@
"volta": {
"node": "10.16.3",
"yarn": "1.17.3"
},
"ember-addon": {
"paths": [
"lib/local-linker"
]
}
}
3 changes: 3 additions & 0 deletions packages/@glimmer/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"@glimmer/wire-format": "^0.50.0",
"@glimmer/interfaces": "^0.50.0",
"@simple-dom/interface": "^1.4.0"
},
"devDependencies": {
"@glimmer/local-debug-flags": "^0.50.0"
}
}
1 change: 1 addition & 0 deletions packages/@glimmer/opcode-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@glimmer/reference": "^0.50.0"
},
"devDependencies": {
"@glimmer/debug": "^0.50.0",
"@glimmer/local-debug-flags": "^0.50.0"
}
}
3 changes: 3 additions & 0 deletions packages/@glimmer/program/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"@glimmer/util": "^0.50.0",
"@glimmer/interfaces": "^0.50.0",
"@glimmer/encoder": "^0.50.0"
},
"devDependencies": {
"@glimmer/local-debug-flags": "^0.50.0"
}
}
31 changes: 30 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,11 @@ asynckit@^0.4.0:
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=

at-least-node@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==

atob@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
Expand Down Expand Up @@ -3847,6 +3852,16 @@ fs-extra@^8.0.1, fs-extra@^8.1.0:
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-extra@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3"
integrity sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g==
dependencies:
at-least-node "^1.0.0"
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^1.0.0"

fs-merger@^3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/fs-merger/-/fs-merger-3.0.2.tgz#bf111334b89b8d65b95580d33c587dc79620a4e3"
Expand Down Expand Up @@ -5066,6 +5081,15 @@ jsonfile@^4.0.0:
optionalDependencies:
graceful-fs "^4.1.6"

jsonfile@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179"
integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==
dependencies:
universalify "^1.0.0"
optionalDependencies:
graceful-fs "^4.1.6"

jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
Expand Down Expand Up @@ -7827,7 +7851,7 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"

symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.0:
symlink-or-copy@^1.0.0, symlink-or-copy@^1.0.1, symlink-or-copy@^1.1.8, symlink-or-copy@^1.2.0, symlink-or-copy@^1.3.0, symlink-or-copy@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/symlink-or-copy/-/symlink-or-copy-1.3.1.tgz#9506dd64d8e98fa21dcbf4018d1eab23e77f71fe"
integrity sha512-0K91MEXFpBUaywiwSSkmKjnGcasG/rVBXFLJz5DrgGabpYD6N+3yZrfD6uUIfpuTu65DZLHi7N8CizHc07BPZA==
Expand Down Expand Up @@ -8286,6 +8310,11 @@ universalify@^0.1.0:
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==

universalify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==

[email protected], unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
Expand Down

0 comments on commit 5bf949b

Please sign in to comment.