Skip to content

Commit

Permalink
chore: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed May 17, 2021
1 parent 3d489d4 commit 06bc250
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 43 deletions.
8 changes: 2 additions & 6 deletions packages/cli-plugin-scaffold-admin-app-module/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ export default (): CliCommandScaffoldTemplate<Input> => ({
);
const baseTsConfigBuildJson = await readJson<TsConfigJson>(baseTsConfigBuildJsonPath);

ora.start(
`Creating new Admin app module files in ${chalk.green(fullLocation)}...`
);
ora.start(`Creating new Admin app module files in ${chalk.green(fullLocation)}...`);

await fs.mkdirSync(fullLocation, { recursive: true });

Expand Down Expand Up @@ -247,9 +245,7 @@ export default (): CliCommandScaffoldTemplate<Input> => ({
}

// Update root tsconfig.build.json file paths
ora.start(
`Updating base tsconfig compilerOptions.paths to contain the package...`
);
ora.start(`Updating base tsconfig compilerOptions.paths to contain the package...`);
if (!baseTsConfigBuildJson.compilerOptions) {
baseTsConfigBuildJson.compilerOptions = {};
}
Expand Down
11 changes: 1 addition & 10 deletions packages/cli-plugin-scaffold-ci/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,10 @@
"dependencies": {
"@webiny/cli": "^5.5.0",
"@webiny/cli-plugin-scaffold": "^5.5.0",
"@webiny/error": "^5.5.0",
"case": "^1.6.3",
"chalk": "^4.1.0",
"execa": "^5.0.0",
"indent-string": "^4.0.0",
"load-json-file": "^6.2.0",
"ncp": "^2.0.0",
"octokit": "^1.0.4",
"pluralize": "^8.0.0",
"replace-in-path": "^1.0.4",
"terminal-link": "^2.0.0",
"validate-npm-package-name": "^3.0.0",
"write-json-file": "^4.3.0"
"validate-npm-package-name": "^3.0.0"
},
"devDependencies": {
"@babel/cli": "^7.5.5",
Expand Down
1 change: 0 additions & 1 deletion packages/cli-plugin-scaffold-ci/src/githubActions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ const plugin: CliPluginsScaffoldCi<Input> = {
}

// TODO: AWS secrets, want to paste them now or later?

];
},
onGenerate: async ({ input, inquirer }) => {
Expand Down
8 changes: 2 additions & 6 deletions packages/cli-plugin-scaffold-graphql-service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ export default (): CliCommandScaffoldTemplate<Input> => ({
});

// Update package tsconfig.build "extends" path
ora.start(
`Updating package tsconfig.build extends path to root tsconfig.build...`
);
ora.start(`Updating package tsconfig.build extends path to root tsconfig.build...`);
const tsConfigBuildPath = tsConfigPath.replace("tsconfig.json", "tsconfig.build.json");
const tsConfigBuild = await readJson<TsConfigJson>(tsConfigBuildPath);
tsConfigBuild.extends = baseTsConfigRelativePath.replace(
Expand All @@ -309,9 +307,7 @@ export default (): CliCommandScaffoldTemplate<Input> => ({
});

// Update root tsconfig.build.json file paths
ora.start(
`Updating base tsconfig compilerOptions.paths to contain the package...`
);
ora.start(`Updating base tsconfig compilerOptions.paths to contain the package...`);
if (!baseTsConfigBuildJson.compilerOptions) {
baseTsConfigBuildJson.compilerOptions = {};
}
Expand Down
8 changes: 2 additions & 6 deletions packages/cli-plugin-scaffold-react-component/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ export default (): CliCommandScaffoldTemplate<Input> => ({
);
const baseTsConfigBuildJson = await readJson<TsConfigJson>(baseTsConfigBuildJsonPath);

ora.start(
`Creating new Admin app module files in ${chalk.green(fullLocation)}...`
);
ora.start(`Creating new Admin app module files in ${chalk.green(fullLocation)}...`);

await fs.mkdirSync(fullLocation, { recursive: true });

Expand Down Expand Up @@ -237,9 +235,7 @@ export default (): CliCommandScaffoldTemplate<Input> => ({
}

// Update root tsconfig.build.json file paths
ora.start(
`Updating base tsconfig compilerOptions.paths to contain the package...`
);
ora.start(`Updating base tsconfig compilerOptions.paths to contain the package...`);
if (!baseTsConfigBuildJson.compilerOptions) {
baseTsConfigBuildJson.compilerOptions = {};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-plugin-scaffold/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface CliCommandScaffoldCallableArgs<T extends Record<string, any>> {
input: T;
context: ContextInterface;
wait: (ms?: number) => Promise<void>;
inquirer: typeof inquirer,
inquirer: typeof inquirer;
ora: Ora;
}

Expand Down
10 changes: 7 additions & 3 deletions scripts/setupProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ const execa = require("execa");
// Build all packages in the "packages" workspace.
console.log(`🏗 Building packages...`);
try {
await execa("yarn", ["webiny", "workspaces", "run", "build", "--folder", "packages", "--env", "dev"], {
stdio: "inherit"
});
await execa(
"yarn",
["webiny", "workspaces", "run", "build", "--folder", "packages", "--env", "dev"],
{
stdio: "inherit"
}
);
console.log(`✅️ Packages were built successfully!`);
} catch (err) {
console.log(`🚨 Failed to build packages: ${err.message}`);
Expand Down
22 changes: 12 additions & 10 deletions webiny.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@ export default {
import("@webiny/cli-plugin-scaffold-ci")
]);

return modules.map(m => {
// Use only "fulfilled" imports.
if (m.status === "fulfilled") {
try {
return m.value.default();
} catch {
// This one is most like not built yet.
return null;
return modules
.map(m => {
// Use only "fulfilled" imports.
if (m.status === "fulfilled") {
try {
return m.value.default();
} catch {
// This one is most like not built yet.
return null;
}
}
}
}).filter(Boolean);
})
.filter(Boolean);
} catch (e) {
// If the whole promise fails, act as if there are no plugins.
return [];
Expand Down

0 comments on commit 06bc250

Please sign in to comment.