Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Switch build process to use microbundle #209

Merged
merged 5 commits into from Jan 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintignore
@@ -0,0 +1,5 @@
node_modules
typings
dist
deno_dist
src/*.deno.ts
17 changes: 16 additions & 1 deletion .eslintrc.json
@@ -1,3 +1,18 @@
{
"extends": ["eta-dev"]
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/ban-types": 0
}
}
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright 2019 Ben Gubler <nebrelbug@gmail.com>
Copyright 2023 Ben Gubler <nebrelbug@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion deno_dist/LICENSE
@@ -1,4 +1,4 @@
Copyright 2019 Ben Gubler <nebrelbug@gmail.com>
Copyright 2023 Ben Gubler <nebrelbug@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 2 additions & 2 deletions deno_dist/file-utils.ts
Expand Up @@ -56,7 +56,7 @@ function getWholeFilePath(
function getPath(path: string, options: EtaConfig): string {
let includePath: string | false = false;
const views = options.views;
let searchedPaths: Array<string> = [];
const searchedPaths: Array<string> = [];

// If these four values are the same,
// getPath() will return the same result every time.
Expand Down Expand Up @@ -111,7 +111,7 @@ function getPath(path: string, options: EtaConfig): string {
) {
// If the above returned true, we know that the filePath was just set to a path
// That exists (Array.some() returns as soon as it finds a valid element)
return (filePath as unknown) as string;
return filePath as unknown as string;
} else if (typeof views === "string") {
// Search for the file if views is a single directory
filePath = getWholeFilePath(path, views, true);
Expand Down
2 changes: 1 addition & 1 deletion deno_dist/parse.ts
Expand Up @@ -133,7 +133,7 @@ export default function parse(

while ((closeTag = parseCloseReg.exec(str))) {
if (closeTag[1]) {
let content = str.slice(lastIndex, closeTag.index);
const content = str.slice(lastIndex, closeTag.index);

parseOpenReg.lastIndex = lastIndex = parseCloseReg.lastIndex;

Expand Down
2 changes: 1 addition & 1 deletion deno_dist/utils.ts
Expand Up @@ -24,7 +24,7 @@ export function hasOwnProp(obj: object, prop: string): boolean {

export function copyProps<T>(toObj: T, fromObj: T): T {
for (const key in fromObj) {
if (hasOwnProp((fromObj as unknown) as object, key)) {
if (hasOwnProp(fromObj as unknown as object, key)) {
toObj[key] = fromObj[key];
}
}
Expand Down