Skip to content

Commit

Permalink
Remove typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Machy8 committed Jan 3, 2024
1 parent 632948c commit 09a01b4
Show file tree
Hide file tree
Showing 51 changed files with 2,070 additions and 5,842 deletions.
58 changes: 37 additions & 21 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
module.exports = {
env: {
browser: true,
es2021: true
'env': {
'browser': true,
'es2022': true
},
ignorePatterns: [
'**/dist'
'extends': 'eslint:recommended',
'overrides': [
{
'env': {
'node': true
},
'files': [
'.eslintrc.{js,cjs}'
],
'parserOptions': {
'sourceType': 'script'
}
}
],
extends: [
'standard-with-typescript'
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json'
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
rules: {
'no-tabs': ['error', { allowIndentationTabs: true }],
'@typescript-eslint/indent': ['error', 'tab'],
indent: ['error', 'tab'],
'no-extra-semi': 'error',
semi: 'off',
'@typescript-eslint/semi': ['off'],
'@typescript-eslint/no-extra-semi': ['error']
'rules': {
'indent': [
'error',
'tab'
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
],
}
}
};
51 changes: 10 additions & 41 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,51 +16,20 @@
}
</style>

<script type="importmap">
{
"imports": {
"signalizejs": "/packages/signalizejs/src/Signalize.js"
}
}
</script>

<script type="module">
import Signalize from 'signalizejs';
import directives from 'signalizejs/directives';
import domTraverser from 'signalizejs/traverse-dom';
import evaluator from 'signalizejs/evaluator';

// Use the directives plugin
const { component, signal, on, select, scope } = new Signalize({
});

component('x-button', {
setup({ $ref, $child, $connected, $disconnected }) {
const form = $ref('form');
const number = signal(2);

$child('x-form').then((elscop) => {
console.log(elscop);
});

return {
number
}
},
});

setTimeout(() => {
component('x-form', {
async setup() {
await new Promise((resolve) => {
setTimeout(() => {
resolve();
console.log('meh');
}, 3000);
})
}
});
console.log('set');
}, 2000);

const signalize = new Signalize();
console.log(signalize);
</script>
</body>

<x-button>
<x-form ref="form">
<input />
</x-form>
</x-button>
</html>
Loading

0 comments on commit 09a01b4

Please sign in to comment.