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.
Files changed (44) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/LICENSE +24 -0
  3. package/README.md +282 -2
  4. package/bin/express-cli.js +575 -0
  5. package/lib/app.js +607 -0
  6. package/lib/prompts.js +338 -0
  7. package/lib/wizard.js +398 -0
  8. package/package.json +65 -4
  9. package/templates/app/Dockerfile.ejs +64 -0
  10. package/templates/app/app.js.ejs +163 -0
  11. package/templates/app/csrf.js.ejs +21 -0
  12. package/templates/app/dockerignore +15 -0
  13. package/templates/app/env.example.ejs +40 -0
  14. package/templates/app/eslint.config.js.ejs +28 -0
  15. package/templates/app/gitignore +22 -0
  16. package/templates/app/npmrc +8 -0
  17. package/templates/app/pnpm-workspace.yaml +24 -0
  18. package/templates/app/routes/index.js.ejs +22 -0
  19. package/templates/app/routes/uploads.js.ejs +94 -0
  20. package/templates/app/routes/users.js.ejs +42 -0
  21. package/templates/app/test/app.test.js.ejs +199 -0
  22. package/templates/app/www.js.ejs +46 -0
  23. package/templates/public/index.html +13 -0
  24. package/templates/public/stylesheets/style.css +8 -0
  25. package/templates/versions.json +49 -0
  26. package/templates/views/error.ejs +12 -0
  27. package/templates/views/error.hbs +3 -0
  28. package/templates/views/error.pug +6 -0
  29. package/templates/views/error.twig +7 -0
  30. package/templates/views/index.ejs +11 -0
  31. package/templates/views/index.hbs +2 -0
  32. package/templates/views/index.pug +5 -0
  33. package/templates/views/index.twig +6 -0
  34. package/templates/views/layout.hbs +10 -0
  35. package/templates/views/layout.pug +7 -0
  36. package/templates/views/layout.twig +10 -0
  37. package/templates/views/new-user.ejs +18 -0
  38. package/templates/views/new-user.hbs +9 -0
  39. package/templates/views/new-user.pug +13 -0
  40. package/templates/views/new-user.twig +13 -0
  41. package/templates/views/uploads.ejs +16 -0
  42. package/templates/views/uploads.hbs +7 -0
  43. package/templates/views/uploads.pug +10 -0
  44. package/templates/views/uploads.twig +11 -0
@@ -0,0 +1,11 @@
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
+ <p>Welcome to <%= title %></p>
10
+ </body>
11
+ </html>
@@ -0,0 +1,2 @@
1
+ <h1>{{title}}</h1>
2
+ <p>Welcome to {{title}}</p>
@@ -0,0 +1,5 @@
1
+ extends layout
2
+
3
+ block content
4
+ h1= title
5
+ p Welcome to #{title}
@@ -0,0 +1,6 @@
1
+ {% extends 'layout.twig' %}
2
+
3
+ {% block body %}
4
+ <h1>{{ title|e }}</h1>
5
+ <p>Welcome to {{ title|e }}</p>
6
+ {% endblock %}
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>{{title}}</title>
5
+ <link rel='stylesheet' href='/stylesheets/style.css' />
6
+ </head>
7
+ <body>
8
+ {{{body}}}
9
+ </body>
10
+ </html>
@@ -0,0 +1,7 @@
1
+ doctype html
2
+ html
3
+ head
4
+ title= title
5
+ link(rel='stylesheet', href='/stylesheets/style.css')
6
+ body
7
+ block content
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>{{ title|e }}</title>
5
+ <link rel='stylesheet' href='/stylesheets/style.css' />
6
+ </head>
7
+ <body>
8
+ {% block body %}{% endblock %}
9
+ </body>
10
+ </html>
@@ -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,7 @@
1
+ <h1>{{title}}</h1>
2
+ {{#if uploaded}}<p>Uploaded {{uploaded}}</p>{{/if}}
3
+ <form method="post" action="/uploads" enctype="multipart/form-data">
4
+ @csrf
5
+ <input type="file" name="file">
6
+ <button type="submit">Upload</button>
7
+ </form>
@@ -0,0 +1,10 @@
1
+ extends layout
2
+
3
+ block content
4
+ h1= title
5
+ if uploaded
6
+ p Uploaded #{uploaded}
7
+ form(method='post', action='/uploads', enctype='multipart/form-data')
8
+ @csrf
9
+ input(type='file', name='file')
10
+ button(type='submit') Upload
@@ -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 %}