Skip to content

Commit

Permalink
Switch build process to use microbundle (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrelbug authored Jan 21, 2023
1 parent 72f6c5b commit 3442ceb
Show file tree
Hide file tree
Showing 48 changed files with 5,136 additions and 2,137 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
typings
dist
deno_dist
src/*.deno.ts
17 changes: 16 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 3442ceb

Please sign in to comment.