Skip to content

Commit

Permalink
Replaced grunt with esbuild
Browse files Browse the repository at this point in the history
esbuild + shell scripts are much simpler and faster.

Also added self-signed certs for https in nginx
  • Loading branch information
stupid-genius committed Nov 7, 2023
1 parent 89f0104 commit b35d232
Show file tree
Hide file tree
Showing 20 changed files with 4,801 additions and 18,992 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

Empty file added .env
Empty file.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.swp
.tmp
.idea
node_modules
bower_components
build
dist
package
*.log.gz
225 changes: 0 additions & 225 deletions Gruntfile.js

This file was deleted.

15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@ I decided to put together my own starting point for simple, usually disposable,

Uses:
- BrowserSync
- Grunt
- Node
- EJS
- esbuild
- Express
- ejs
- Mocha
- Morgan
- Node
- Winston
- Mocha

Additional in 1.1.0:
- Bower
- Wiredep
- Usemin
- Dockerfile
- dist package
File renamed without changes.
15 changes: 0 additions & 15 deletions app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,8 @@
<head>
<meta charset="UTF-8">
<title>SPA Template</title>

<!-- build:css(app/public) styles/vendor.css -->
<!-- bower:css -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(app/public) styles/main.css -->
<link rel="stylesheet" href="styles/main.css" />
<!-- endbuild -->


<!-- build:js(app/public) scripts/vendor.js -->
<!-- bower:js -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:js(app/public) scripts/index.js -->
<script src="scripts/index.js"></script>
<!-- endbuild -->
</head>
<body>
<section id="header">
Expand Down
2 changes: 1 addition & 1 deletion app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ app.set('view engine', 'ejs');

app.use(morgan('common'));
/* eslint-disable-next-line no-undef */
app.use(servefavicon(path.join(__dirname, '../public/images/favicon.ico')));
app.use(servefavicon(path.join(__dirname, '../public/favicon.ico')));
app.use(require('./routes'));
/* eslint-disable-next-line no-undef */
app.use(express.static(path.join(__dirname, '../public')));
Expand Down
13 changes: 0 additions & 13 deletions app/views/bundle.ejs
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<!-- build:css(app/public) styles/vendor.css -->
<!-- bower:css -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(app/public) styles/main.css -->
<link rel="stylesheet" href="styles/main.css" />
<!-- endbuild -->

<!-- build:js(app/public) scripts/vendor.js -->
<!-- bower:js -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:js(app/public) scripts/index.js -->
<script src="scripts/index.js"></script>
<!-- endbuild -->

17 changes: 0 additions & 17 deletions bower.json

This file was deleted.

17 changes: 17 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e

echo Build start
echo esbuild
node esbuild.mjs
if [[ -z "$1" || "$1" -ne spa ]]; then
echo Full build
cp -R app/src/ dist/src/
cp -R app/views/ dist/views/
else
echo SPA build
fi
cp app/public/* dist/public/ 2> /dev/null || :
cp -R app/public/images dist/public/
echo Build complete
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
restart: always
ports:
- "80:80"
- "443:443"
depends_on:
- api

Loading

0 comments on commit b35d232

Please sign in to comment.