create-express-new 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +126 -0
- package/LICENSE +24 -0
- package/README.md +282 -2
- package/bin/express-cli.js +575 -0
- package/lib/app.js +607 -0
- package/lib/prompts.js +338 -0
- package/lib/wizard.js +398 -0
- package/package.json +65 -4
- package/templates/app/Dockerfile.ejs +64 -0
- package/templates/app/app.js.ejs +163 -0
- package/templates/app/csrf.js.ejs +21 -0
- package/templates/app/dockerignore +15 -0
- package/templates/app/env.example.ejs +40 -0
- package/templates/app/eslint.config.js.ejs +28 -0
- package/templates/app/gitignore +22 -0
- package/templates/app/npmrc +8 -0
- package/templates/app/pnpm-workspace.yaml +24 -0
- package/templates/app/routes/index.js.ejs +22 -0
- package/templates/app/routes/uploads.js.ejs +94 -0
- package/templates/app/routes/users.js.ejs +42 -0
- package/templates/app/test/app.test.js.ejs +199 -0
- package/templates/app/www.js.ejs +46 -0
- package/templates/public/index.html +13 -0
- package/templates/public/stylesheets/style.css +8 -0
- package/templates/versions.json +49 -0
- package/templates/views/error.ejs +12 -0
- package/templates/views/error.hbs +3 -0
- package/templates/views/error.pug +6 -0
- package/templates/views/error.twig +7 -0
- package/templates/views/index.ejs +11 -0
- package/templates/views/index.hbs +2 -0
- package/templates/views/index.pug +5 -0
- package/templates/views/index.twig +6 -0
- package/templates/views/layout.hbs +10 -0
- package/templates/views/layout.pug +7 -0
- package/templates/views/layout.twig +10 -0
- package/templates/views/new-user.ejs +18 -0
- package/templates/views/new-user.hbs +9 -0
- package/templates/views/new-user.pug +13 -0
- package/templates/views/new-user.twig +13 -0
- package/templates/views/uploads.ejs +16 -0
- package/templates/views/uploads.hbs +7 -0
- package/templates/views/uploads.pug +10 -0
- package/templates/views/uploads.twig +11 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title><%= title %></title>
|
|
5
|
+
<link rel='stylesheet' href='/stylesheets/style.css' />
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<h1><%= title %></h1>
|
|
9
|
+
<% if (locals.added) { %><p>Added <%= added %></p><% } %>
|
|
10
|
+
<% if (locals.error) { %><p class="error"><%= error %></p><% } %>
|
|
11
|
+
<form method="post" action="/users/new">
|
|
12
|
+
@csrf
|
|
13
|
+
<label for="name">Name</label>
|
|
14
|
+
<input id="name" type="text" name="name" value="<%= locals.name %>">
|
|
15
|
+
<button type="submit">Add user</button>
|
|
16
|
+
</form>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<h1>{{title}}</h1>
|
|
2
|
+
{{#if added}}<p>Added {{added}}</p>{{/if}}
|
|
3
|
+
{{#if error}}<p class="error">{{error}}</p>{{/if}}
|
|
4
|
+
<form method="post" action="/users/new">
|
|
5
|
+
@csrf
|
|
6
|
+
<label for="name">Name</label>
|
|
7
|
+
<input id="name" type="text" name="name" value="{{name}}">
|
|
8
|
+
<button type="submit">Add user</button>
|
|
9
|
+
</form>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
extends layout
|
|
2
|
+
|
|
3
|
+
block content
|
|
4
|
+
h1= title
|
|
5
|
+
if added
|
|
6
|
+
p Added #{added}
|
|
7
|
+
if error
|
|
8
|
+
p.error= error
|
|
9
|
+
form(method='post', action='/users/new')
|
|
10
|
+
@csrf
|
|
11
|
+
label(for='name') Name
|
|
12
|
+
input#name(type='text', name='name', value=name)
|
|
13
|
+
button(type='submit') Add user
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% extends 'layout.twig' %}
|
|
2
|
+
|
|
3
|
+
{% block body %}
|
|
4
|
+
<h1>{{ title|e }}</h1>
|
|
5
|
+
{% if added %}<p>Added {{ added|e }}</p>{% endif %}
|
|
6
|
+
{% if error %}<p class="error">{{ error|e }}</p>{% endif %}
|
|
7
|
+
<form method="post" action="/users/new">
|
|
8
|
+
@csrf
|
|
9
|
+
<label for="name">Name</label>
|
|
10
|
+
<input id="name" type="text" name="name" value="{{ name|e }}">
|
|
11
|
+
<button type="submit">Add user</button>
|
|
12
|
+
</form>
|
|
13
|
+
{% endblock %}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title><%= title %></title>
|
|
5
|
+
<link rel='stylesheet' href='/stylesheets/style.css' />
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<h1><%= title %></h1>
|
|
9
|
+
<% if (locals.uploaded) { %><p>Uploaded <%= uploaded %></p><% } %>
|
|
10
|
+
<form method="post" action="/uploads" enctype="multipart/form-data">
|
|
11
|
+
@csrf
|
|
12
|
+
<input type="file" name="file">
|
|
13
|
+
<button type="submit">Upload</button>
|
|
14
|
+
</form>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% extends 'layout.twig' %}
|
|
2
|
+
|
|
3
|
+
{% block body %}
|
|
4
|
+
<h1>{{ title|e }}</h1>
|
|
5
|
+
{% if uploaded %}<p>Uploaded {{ uploaded|e }}</p>{% endif %}
|
|
6
|
+
<form method="post" action="/uploads" enctype="multipart/form-data">
|
|
7
|
+
@csrf
|
|
8
|
+
<input type="file" name="file">
|
|
9
|
+
<button type="submit">Upload</button>
|
|
10
|
+
</form>
|
|
11
|
+
{% endblock %}
|