Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add plain html with css and javascript #44

Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 6 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ async function startProject() {
*/
if (projectStack === "frontend") {
framework = await promptFrontendFramework();
language = await promptFrontendLanguage();

await createFrontendProject(projectName, framework, language);
console.log("testing:", framework);
if (framework !== "noframework") {
language = await promptFrontendLanguage();
return await createFrontendProject(projectName, framework, language);
}
await createFrontendProject(projectName, framework);
} else if (projectStack === "backend") {
framework = await promptBackendFramework();

Expand Down
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/startease.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>StartEase + Html</title>
</head>

<body>
<h1>Hello From StartEase</h1>
<script type="module" src="index.js"></script>
</body>

</html>
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Project generated with startease - https://startease.vercel.app
* @link https://startease.vercel.app
*/


console.log("Welcome to the new project created with startease");
console.log("Project generated with startease - @ https://startease.vercel.app");
19 changes: 16 additions & 3 deletions src/utils/create-frontend-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,22 @@ export async function createFrontendProject(projectName, framework, language) {

// success message
stages.push({
message: `Frontend - ReactJS project with ${
language.charAt(0).toUpperCase() + language.slice(1)
} created successfully! : ${destinationPath}`,
message: `Frontend - ReactJS project with ${language.charAt(0).toUpperCase() + language.slice(1)
} created successfully! : ${destinationPath}`,
duration: 1000,
});

await startSpinner();
}
else if (framework === "noframework") {
copyFile(
getTemplateDir(`frontend/html-css-javascript`),
destinationPath,
);

// success message
stages.push({
message: `Frontend - plain html with css and javascript created successfully! : ${destinationPath}`,
duration: 1000,
});

Expand Down
2 changes: 1 addition & 1 deletion src/utils/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function promptFrontendFramework() {
type: "list",
name: "framework",
message: "Choose a framework:",
choices: ["ReactJs"],
choices: ["ReactJs", "NoFramework"],
},
]);

Expand Down
16 changes: 16 additions & 0 deletions templates/frontend/html-css-javascript/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/startease.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>StartEase + Html</title>
</head>

<body>
<h1>Hello From StartEase</h1>
<script type="module" src="index.js"></script>
</body>

</html>
8 changes: 8 additions & 0 deletions templates/frontend/html-css-javascript/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Project generated with startease - https://startease.vercel.app
* @link https://startease.vercel.app
*/


console.log("Welcome to the new project created with startease");
console.log("Project generated with startease - @ https://startease.vercel.app");
19 changes: 19 additions & 0 deletions templates/frontend/html-css-javascript/public/startease.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions templates/frontend/html-css-javascript/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*
Project generated with startease - https: //startease.vercel.app
*/
Loading