Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

feat(generator): add one-app-runner script #96

Merged
merged 4 commits into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/generator-one-app-module/__tests__/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ describe('generator-one-app-module', () => {
},
},
devDependencies: {
'parrot-middleware': '^4.1.0',
'parrot-middleware': '^3.1.0',
infoxicator marked this conversation as resolved.
Show resolved Hide resolved
},
});
});
Expand Down Expand Up @@ -291,7 +291,7 @@ describe('generator-one-app-module', () => {
},
},
devDependencies: {
'parrot-middleware': '^4.1.0',
'parrot-middleware': '^3.1.0',
infoxicator marked this conversation as resolved.
Show resolved Hide resolved
},
});
});
Expand Down
10 changes: 9 additions & 1 deletion packages/generator-one-app-module/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ module.exports = class extends Generator {
{ globOptions: { dot: true } }
);
this.fs.extendJSON(this.destinationPath('package.json'), {
'one-amex': {
runner: {
rootModuleName: this.modulePackageName,
},
},
dependencies: {
'content-security-policy-builder': '^2.1.0',
},
Expand Down Expand Up @@ -204,6 +209,9 @@ module.exports = class extends Generator {
);
this.fs.extendJSON(this.destinationPath('package.json'), {
'one-amex': {
runner: {
rootModuleName: this.modulePackageName,
},
bundler: {
providesExternals: 'react-intl',
},
Expand All @@ -220,7 +228,7 @@ module.exports = class extends Generator {
},
},
devDependencies: {
'parrot-middleware': '^4.1.0',
'parrot-middleware': '^3.1.0',
Francois-Esquire marked this conversation as resolved.
Show resolved Hide resolved
},
});
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"contributors": [],
"scripts": {
"start": "one-app-runner",
"prebuild": "npm run clean",
"build": "bundle-module",
"watch:build": "npm run build -- --watch",
Expand All @@ -13,13 +14,20 @@
"test:unit": "jest",
"test": "npm run test:lint && npm run test:unit"
},
"one-amex": {
"runner": {
"dockerImage": "oneamex/one-app-dev:latest",
"modules": ["."]
}
},
"dependencies": {
"@americanexpress/one-app-router": "^1.0.0",
"holocron": "^1.1.0",
"react": "^16.12.0"
},
"devDependencies": {
"@americanexpress/one-app-bundler": "^6.0.0",
"@americanexpress/one-app-runner": "^6.0.0",
"amex-jest-preset-react": "^6.0.0",
"babel-eslint": "^8.2.6",
"babel-preset-amex": "^3.2.0",
Expand Down