Skip to content

Commit

Permalink
add fix-rsvp-module-reference script to fix rsvp
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Jun 22, 2021
1 parent e23eea3 commit 5312bf2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ADD .babelrc tsconfig.json package.json package-lock.json webpack.config.js /cod

RUN npm install

ADD examples /code/examples
ADD scripts /code/scripts/
ADD packages /code/packages/
ADD test /code/test
Expand Down
1 change: 1 addition & 0 deletions scripts/build-libraries.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { promisify } from 'util';
import { exec } from 'child_process';
import lookup from 'recursive-lookup';
import './dedupe-glimmer-validator.js';
import './fix-rsvp-module-reference.js';
import './make-glimmer-compiler-universal.js';

const shell = promisify(exec);
Expand Down
10 changes: 10 additions & 0 deletions scripts/fix-rsvp-module-reference.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import fs from 'fs/promises';

let packageJSONBuffer = await fs.readFile('node_modules/rsvp/package.json');
let packageJSON = JSON.parse(packageJSONBuffer.toString());

await fs.writeFile('node_modules/rsvp/package.json', JSON.stringify(Object.assign(packageJSON, {
"module": "lib/rsvp.js",
}), null, 2));

console.log('rsvp/package.json fixed');

0 comments on commit 5312bf2

Please sign in to comment.