innetjs 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/innet
CHANGED
package/package.json
CHANGED
package/templates/fe/README.md
CHANGED
|
@@ -71,7 +71,9 @@ GENERATE_SOURCEMAP=false
|
|
|
71
71
|
CSS_IN_JS=false
|
|
72
72
|
|
|
73
73
|
# import styles from './App.css'
|
|
74
|
-
# you can use css modules with CSS_MODULES=true
|
|
74
|
+
# you can use css modules with CSS_MODULES=true.
|
|
75
|
+
# If CSS_MODULES equals false you still can use css modules,
|
|
76
|
+
# just name the css or scss file like App.module.css
|
|
75
77
|
CSS_MODULES=false
|
|
76
78
|
|
|
77
79
|
# you can change the public folder
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"start": "npx innetjs start"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"
|
|
8
|
-
"innet": "^0.
|
|
9
|
-
"watch-state": "^3.
|
|
7
|
+
"innet": "^1.0.0",
|
|
8
|
+
"@innet/dom": "^0.1.1",
|
|
9
|
+
"watch-state": "^3.4.3"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"innetjs": "^1.
|
|
12
|
+
"innetjs": "^1.10.0"
|
|
13
13
|
}
|
|
14
14
|
}
|
package/templates/fe/src/App.tsx
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import styles from './App.scss'
|
|
1
|
+
import { State } from 'watch-state'
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
@state name = 'World'
|
|
3
|
+
import styles from './App.scss'
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<div class={styles.root}>
|
|
10
|
-
<h1 class={styles.header}>
|
|
11
|
-
Hello{() => this.name ? `, ${this.name}` : ''}!
|
|
12
|
-
</h1>
|
|
13
|
-
<input
|
|
14
|
-
class={styles.input}
|
|
15
|
-
oninput={e => this.name = e.target.value}
|
|
16
|
-
placeholder='Enter your name'
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
}
|
|
5
|
+
const name = new State('World')
|
|
22
6
|
|
|
23
|
-
export
|
|
7
|
+
export const App = () => (
|
|
8
|
+
<div class={styles.root}>
|
|
9
|
+
<h1 class={styles.header}>
|
|
10
|
+
Hello{() => name.value ? `, ${name.value}` : ''}!
|
|
11
|
+
</h1>
|
|
12
|
+
<input
|
|
13
|
+
class={styles.input}
|
|
14
|
+
oninput={e => name.value = e.target.value}
|
|
15
|
+
placeholder='Enter your name'
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
)
|