Marek Piasecki
2 years ago
8 changed files with 5282 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||
# Logs |
|||
logs |
|||
*.log |
|||
npm-debug.log* |
|||
yarn-debug.log* |
|||
yarn-error.log* |
|||
pnpm-debug.log* |
|||
lerna-debug.log* |
|||
|
|||
node_modules |
|||
dist |
|||
dist-ssr |
|||
*.local |
|||
|
|||
# Editor directories and files |
|||
.vscode/* |
|||
!.vscode/extensions.json |
|||
!.vscode/settings.json |
|||
.idea |
|||
.DS_Store |
|||
*.suo |
|||
*.ntvs* |
|||
*.njsproj |
|||
*.sln |
|||
*.sw? |
|||
|
|||
coverage |
@ -0,0 +1,11 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8" /> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|||
<title>Imba Module</title> |
|||
</head> |
|||
<body> |
|||
<script type="module" src="/src/index.js"></script> |
|||
</body> |
|||
</html> |
File diff suppressed because it is too large
@ -0,0 +1,27 @@ |
|||
{ |
|||
"name": "pro-router-imba2", |
|||
"type": "module", |
|||
"files": [ |
|||
"dist" |
|||
], |
|||
"main": "./dist/index.umd.cjs", |
|||
"module": "./dist/index.js", |
|||
"exports": { |
|||
".": { |
|||
"import": "./dist/index.js", |
|||
"require": "./dist/index.umd.cjs" |
|||
} |
|||
}, |
|||
"scripts": { |
|||
"dev": "vite", |
|||
"start": "vite", |
|||
"build": "vite build", |
|||
"watch": "vite build --watch", |
|||
"preview": "vite preview" |
|||
}, |
|||
"devDependencies": { |
|||
"imba": "^2.0.0-alpha.226", |
|||
"vite": "^3.2.5", |
|||
"vite-plugin-imba": "^0.10.1" |
|||
} |
|||
} |
@ -0,0 +1,3 @@ |
|||
# Module Template |
|||
|
|||
See https://github.com/imba/imba.io/pull/255 for most up-to-date usage guide. |
@ -0,0 +1 @@ |
|||
import "./main.imba" |
@ -0,0 +1,16 @@ |
|||
export let state = { |
|||
count: 0 |
|||
} |
|||
|
|||
export def increment |
|||
state.count++ |
|||
|
|||
tag app |
|||
<self@click=increment> "count is {state.count}" |
|||
css d:inline-block us:none cursor:pointer fs:6 p:2.5 5 rd:2.5 |
|||
tween:box-shadow 250ms, background-color 250ms |
|||
ff:Arial c:black/87 bg:indigo4 bxs:xs |
|||
@hover bg:indigo3 bxs:lg |
|||
|
|||
if import.meta.env.MODE is 'development' |
|||
imba.mount <app> |
@ -0,0 +1,15 @@ |
|||
import { imba } from 'vite-plugin-imba'; |
|||
import { resolve } from 'path' |
|||
import { defineConfig } from 'vite'; |
|||
import { name } from './package.json' |
|||
|
|||
export default defineConfig({ |
|||
plugins: [imba()], |
|||
build: { |
|||
lib: { |
|||
name: name, |
|||
fileName: "index", |
|||
entry: resolve(__dirname, 'src/main.imba'), |
|||
}, |
|||
}, |
|||
}); |
Loading…
Reference in new issue