Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
chore: clean up sh scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed May 6, 2021
1 parent a655e5b commit 08b4a31
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "^26.4.2",
"typescript": "^4.1.2"
"typescript": "next"
}
}
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
del-cli dist/
rollup -c
1 change: 1 addition & 0 deletions scripts/check.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
yarn cleanup
yarn lint
yarn test
1 change: 1 addition & 0 deletions scripts/dev.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#!/bin/sh
esbuild src/browser.ts --bundle --watch --sourcemap --global-name=Lucia --outfile=dist/lucia.dev.js
3 changes: 2 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
source scripts/check.sh
source scripts/build.sh
printf "\n\n\n\033[1;31m[!] \033[0;33mPlease run \033[0m\`\033[1;36mnp\033[0m\`\n\n"
printf "\n\n\033[1;31m[!] \033[0;33mPlease run \033[0m\`\033[1;36mnp\033[0m\`\n\n"
4 changes: 2 additions & 2 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if (document.readyState === 'loading') {
// Lucia allows for a custom initialization function
// This is to support for delayed init, like for Turbo Drive

// @ts-expect-error: initCallback doesn't exist on window, but we create it.
const initCallback = window.Lucia?.initCallback;
// @ts-expect-error: LuciaInit doesn't exist on window, but we create it.
const initCallback = window.LuciaInit;

if (initCallback) {
init(initCallback);
Expand Down
2 changes: 1 addition & 1 deletion src/core/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { showDirective } from '@directives/show';
import { textDirective } from '@directives/text';

// @ts-expect-error: LuciaDirectives doesn't exist on window, but we create it.
const customGlobalDirectives = window.Lucia?.directives || {};
const customGlobalDirectives = window.LuciaDirectives || {};

export const directives: Directives = {
BIND: bindDirective,
Expand Down
4 changes: 2 additions & 2 deletions src/core/utils/computeExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const computeExpression = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): ((state: KV<unknown>, event?: Event) => any) => {
const formattedExpression = `${returnable ? `return ${expression}` : expression}`;
// @ts-expect-error: LuciaDirectives doesn't exist on window, but we create it.
const customGlobalSpecialProperties = window.Lucia?.specialProperties || {};
// @ts-expect-error: LuciaSpecialProperties doesn't exist on window, but we create it.
const customGlobalSpecialProperties = window.LuciaSpecialProperties || {};
const specialPropertiesNames = [
'$state',
'$el',
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5961,10 +5961,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@^4.1.2:
version "4.2.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
typescript@next:
version "4.3.0-dev.20210506"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210506.tgz#65279fe5746ae4d82397f8ee82c16024e78e1e8c"
integrity sha512-91ypOFD5hHQrmldSns8/oIq9VZ0rpA/t5NC6M9b5ZLcUz6tSF66wDqIBs6fu/yOwvOd7oozYEEC5nuBfItMAsQ==

unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
Expand Down

0 comments on commit 08b4a31

Please sign in to comment.