Rework the build.

Switches to using NPM entirely for dependencies. That allows me to delete lodash from the repository while leaving the dependency in place. I lose the automatic rebuilds.
This commit is contained in:
Savanni D'Gerinel 2023-01-28 11:09:11 -05:00
parent dfd755ed0a
commit d601c8feeb
6 changed files with 4756 additions and 17125 deletions

View File

@ -73,9 +73,6 @@
</div> </div>
</div> </div>
<script src="./lodash.js" type="module"></script>
<script src="./dist/main.js" type="module"></script> <script src="./dist/main.js" type="module"></script>
</body> </body>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
"description": "", "description": "",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
"build": "browserify src/main.ts -p [ tsify ] > dist/bundle.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "Savanni D'Gerinel <savanni@luminescent-dreams.com>", "author": "Savanni D'Gerinel <savanni@luminescent-dreams.com>",
@ -14,6 +15,11 @@
}, },
"devDependencies": { "devDependencies": {
"@types/lodash": "^4.14.191", "@types/lodash": "^4.14.191",
"typescript": "^4.9.4" "babelify": "^10.0.0",
"browserify": "^17.0.0",
"live-server": "^1.2.2",
"tsify": "^5.0.4",
"typescript": "^4.9.4",
"watchify": "^4.0.0"
} }
} }

View File

@ -1,3 +1,5 @@
import * as _ from "lodash";
const replaceTitle = () => { const replaceTitle = () => {
const title = document.querySelector(".js-title"); const title = document.querySelector(".js-title");
if (title && title.innerHTML) { if (title && title.innerHTML) {

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es2015", "target": "es2015",
"module": "es2015", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"rootDir": "src", "rootDir": "src",
"outDir": "./dist", "outDir": "./dist",