-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Template is saved in /packages instead of /api. The generated files h…
…ave been wrapped inside /src/plugins. Package.json's name is updated according to {serviceName}. [WIP #1] The plugins used in src/plugins/index.ts are almost included in serverless.yml. [WIP #2] Yarn is run after the template is generated.
- Loading branch information
Showing
15 changed files
with
241 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141 changes: 141 additions & 0 deletions
141
packages/cli-scaffold-graphql-service/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
packages/cli-scaffold-graphql-service/templateService/.babelrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const alias = require("@webiny/project-utils/aliases/jest"); | ||
|
||
const babel = { | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
node: "8.10" | ||
} | ||
} | ||
], | ||
"@babel/preset-typescript" | ||
], | ||
plugins: [ | ||
["@babel/plugin-proposal-class-properties"], | ||
["@babel/plugin-proposal-object-rest-spread", { useBuiltIns: true }], | ||
["@babel/plugin-transform-runtime", { useESModules: false }], | ||
["babel-plugin-dynamic-import-node"], | ||
["babel-plugin-lodash"], | ||
process.env.NODE_ENV === "test" ? ["babel-plugin-module-resolver", { alias }] : null | ||
].filter(Boolean) | ||
}; | ||
|
||
module.exports = babel; | ||
// | ||
// | ||
// module.exports = require("../../.babel.node"); |
5 changes: 3 additions & 2 deletions
5
packages/cli-scaffold-graphql-service/templateService/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
packages/cli-scaffold-graphql-service/templateService/src/index.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/cli-scaffold-graphql-service/templateService/src/plugins/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import models from "./models"; | ||
import graphql from "./graphql"; | ||
|
||
export default () => [ | ||
models(), | ||
graphql | ||
/* ... Other plugins to be exported ... */ | ||
]; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.