-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(testapp): Replace bower to esbuild
The js build is bundled by esbuild and managed by yarn. Fixes: #425
- Loading branch information
Showing
9 changed files
with
67 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as esbuild from "esbuild" | ||
import { copy } from "esbuild-plugin-copy" | ||
import { entryPoints } from "./entryPoints.mjs" | ||
|
||
await esbuild.build({ | ||
entryPoints: entryPoints, | ||
bundle: true, | ||
minify: true, | ||
write: true, | ||
treeShaking: true, | ||
sourcemap: true, | ||
logLevel: "info", | ||
outdir: "dist", | ||
legalComments: "none", | ||
allowOverwrite: true, | ||
plugins: [ | ||
copy({ | ||
assets: [ | ||
{ | ||
from: ["./node_modules/bootstrap/dist/js/*.min.js"], | ||
to: ["./bootstrap/js"], | ||
}, | ||
{ | ||
from: ["./node_modules/bootstrap/dist/css/*.min.css"], | ||
to: ["./bootstrap/css"], | ||
}, | ||
], | ||
}), | ||
], | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const entryPoints = [ | ||
{ out: "index.js", in: "src/index.js" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "testappjs", | ||
"version": "0.0.1", | ||
"description": "Test App Js Project", | ||
"main": "index.js", | ||
"scripts": { | ||
"esbuild": "rm -rf build && node build.mjs", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"yarn": "npm run yarn:clean && npm run yarn:v2 && npm run yarn:install", | ||
"yarn:install": "yarn install", | ||
"yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", | ||
"yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" | ||
}, | ||
"author": "Flavio Garcia", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"bootstrap": "5.2.3" | ||
}, | ||
"devDependencies": { | ||
"esbuild": "0.17.19", | ||
"esbuild-plugin-copy": "2.1.1" | ||
}, | ||
"packageManager": "yarn@3.5.1" | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters