-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4cd6b07
Showing
15 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
# Указывает, что строки должны заканчиваться символом LF (Line Feed), а не CRLF (используется в Windows) | ||
end_of_line = lf | ||
# Гарантирует, что в конце файла всегда будет новая пустая строка | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
# Удаляет лишние пробелы в конце строк при сохранении файла | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Устанавливаем автоопределение текстовых и бинарных файлов | ||
* text=auto eol=lf | ||
|
||
# Make sure various media files never get somehow auto-detected as text | ||
# and then newline-converted. | ||
*.gif binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.eot binary | ||
*.woff binary | ||
*.woff2 binary | ||
*.svg binary | ||
*.ttf binary | ||
*.png binary | ||
*.otf binary | ||
*.tif binary | ||
*.ogg binary | ||
*.bson binary | ||
*.bmp binary | ||
*.mp3 binary | ||
*.pdf binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: 'CI' | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
- "*/*" | ||
- "**" | ||
pull_request: | ||
branches: | ||
- "*" | ||
- "*/*" | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Исключаем папки с собранными и зависимыми файлами | ||
node_modules/ | ||
dist/ | ||
|
||
# Файлы конфигурации, которые генерируются автоматически или не нужны в репозитории | ||
package-lock.json | ||
tsconfig.tsbuildinfo | ||
|
||
|
||
# Логи и отладочные файлы | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# IDE и редакторы кода | ||
.vscode/ | ||
.idea/ | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
|
||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
{files: ["**/*.{js,mjs,cjs,ts}"]}, | ||
{languageOptions: { globals: globals.browser }}, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommended, | ||
]; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "echo", | ||
"version": "1.0.0", | ||
"description": "Echo.js will be a library for creating “echoes” of events on a web page that react to user actions and create visual, audio or even tactile effects, simulating mode reactions.", | ||
"homepage": "https://github.com/Lokrip/echo#readme", | ||
"bugs": { | ||
"url": "https://github.com/Lokrip/echo/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Lokrip/echo.git" | ||
}, | ||
"license": "ISC", | ||
"author": "", | ||
"type": "commonjs", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "webpack" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.19.0", | ||
"eslint": "^9.19.0", | ||
"globals": "^15.14.0", | ||
"ts-loader": "^9.5.2", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.7.3", | ||
"typescript-eslint": "^8.22.0", | ||
"webpack": "^5.97.1", | ||
"webpack-cli": "^6.0.1" | ||
}, | ||
"dependencies": { | ||
"echo": "file:" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./dist/", | ||
"noImplicitAny": true, | ||
"module": "ESNext", | ||
"target": "es5", | ||
"allowJs": true, | ||
"moduleResolution": "node", | ||
//вместо такого импорта import * as React from "react"; делает в import React from "react" | ||
"allowSyntheticDefaultImports": true, //Этот параметр позволяет использовать синтетические импорты по умолчанию для модулей, которые не экспортируют default. Он помогает работать с модулями, которые используют CommonJS или другие типы экспортов, позволяя импортировать их, как если бы они экспортировали default. Например, это позволяет использовать import x from 'module', даже если модуль не имеет явного экспорта default. | ||
"esModuleInterop": true // Этот параметр включает поддержку межмодульной совместимости между модулями CommonJS и ES6. Включение esModuleInterop помогает TypeScript правильно обрабатывать импорты из CommonJS-модулей, обеспечивая поддержку синтаксиса import для таких модулей. Это позволяет использовать такие импорты, как import fs from 'fs', даже если модуль fs экспортирует свою функциональность через module.exports (что является типичным для CommonJS). | ||
}, | ||
"ts-node": { | ||
//тоесть для ts-node мы переопределяем compilerOptions module на CommonJS | ||
"compilerOptions": { | ||
"module": "CommonJS", | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import webpack from "webpack"; | ||
import path from 'path'; | ||
|
||
const webpackConfig = (env: any) => { | ||
const config: webpack.Configuration = { | ||
mode: env.mode ?? "development", | ||
entry: path.resolve(__dirname, "lib", "index.ts"), | ||
output: { | ||
path: path.resolve(__dirname, "dist"), | ||
filename: "[name].[contenthash].js", | ||
clean: true | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
use: 'ts-loader', | ||
exclude: /node_modules/, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.tsx', '.ts', '.js'], | ||
}, | ||
|
||
} | ||
|
||
return config; | ||
} | ||
|
||
|
||
export default webpackConfig; |