Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add TS build process #588

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions isic/core/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{% if not debug %}
<script src="https://js.sentry-cdn.com/81572a3d084f4fef90e093440762cedd.min.js" crossorigin="anonymous"></script>
{% endif %}
<script src="{% static 'core/dist/bundle.js' %}"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.8.1/cdn.min.js" integrity="sha512-R/Jhpa6TNKZy3VmvYNBe7nQviLLpNXU64csnTYd6cy64donZkeqfqpXSoJRiZ8M1MCgejev/j5NoTx0rZEy+hg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

Expand Down
2 changes: 2 additions & 0 deletions node-src/bundle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Insert references to any source files here, to be included in the output bundle
import './gallery';
Empty file added node-src/gallery.ts
Empty file.
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,28 @@
"npm-run-all": "^4.1.5",
"parcel": "^2.4.1",
"postcss": "^8.4.12",
"postcss-nested": "^5.0.6",
"remixicon": "^2.5.0",
"rimraf": "^3.0.2",
"tailwindcss": "^3.0.24"
"tailwindcss": "^3.0.24",
"typescript": "^4.6.3"
},
"scripts": {
"build": "npm-run-all --sequential build:clean build:parcel",
"build:clean": "rimraf ./isic/core/static/core/dist",
"build:parcel": "parcel build",
"start": "npm-run-all --parallel start:parcel start:sync",
"start:parcel": "parcel watch",
"start:sync": "browser-sync start --config ./dev/browser-sync.config.js"
"start:sync": "browser-sync start --config ./dev/browser-sync.config.js",
"test:tsc": "tsc --noEmit"
},
"targets": {
"bundle": {
"source": "./node-src/bundle.ts",
"distDir": "./isic/core/static/core/dist",
"context": "browser",
"outputFormat": "global"
},
"styles": {
"source": "./node-src/styles.pcss",
"distDir": "./isic/core/static/core/dist"
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2430,7 +2430,7 @@ postcss-load-config@^3.1.4:
lilconfig "^2.0.5"
yaml "^1.10.2"

postcss-nested@5.0.6:
postcss-nested@5.0.6, postcss-nested@^5.0.6:
version "5.0.6"
resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc"
integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==
Expand Down Expand Up @@ -3012,6 +3012,11 @@ type-fest@^0.20.2:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==

typescript@^4.6.3:
version "4.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c"
integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==

ua-parser-js@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.2.tgz#e2976c34dbfb30b15d2c300b2a53eac87c57a775"
Expand Down