From 54571f036b4abca8d20497c957e493ad1df12516 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Mon, 21 Dec 2020 22:34:54 +0100 Subject: [PATCH] refactor(ts): import script using new Hugo Module logic (#77) Allows user to overwrite a specific script. Note: The required version of Hugo might bump up. --- assets/jsconfig.json | 10 ++++++++++ assets/ts/main.ts | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 assets/jsconfig.json diff --git a/assets/jsconfig.json b/assets/jsconfig.json new file mode 100644 index 0000000..9321136 --- /dev/null +++ b/assets/jsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "*": [ + "*" + ] + }, + } +} \ No newline at end of file diff --git a/assets/ts/main.ts b/assets/ts/main.ts index 8875a74..db5a760 100644 --- a/assets/ts/main.ts +++ b/assets/ts/main.ts @@ -6,10 +6,10 @@ * @link: https://github.com/CaiJimmy/hugo-theme-stack */ -import { createGallery } from "./gallery" -import { getColor } from './color'; -import menu from './menu'; -import createElement from './createElement'; +import { createGallery } from "ts/gallery" +import { getColor } from 'ts/color'; +import menu from 'ts/menu'; +import createElement from 'ts/createElement'; let Stack = { init: () => {