aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIndrajith K L2018-02-15 14:24:00 +0530
committerIndrajith K L2018-02-15 14:24:00 +0530
commit506c63b251aaf537015aa7c05e1cab80d435e35d (patch)
treebfb1b9af9f3596c445dc256d7858696c571b0590 /src
downloadsvelte-app-506c63b251aaf537015aa7c05e1cab80d435e35d.tar.gz
svelte-app-506c63b251aaf537015aa7c05e1cab80d435e35d.tar.bz2
svelte-app-506c63b251aaf537015aa7c05e1cab80d435e35d.zip
Initial Commit - Fixed the 'npm run dev' command issue. Original script doesn't build files when changed.
Diffstat (limited to 'src')
-rw-r--r--src/App.html16
-rw-r--r--src/components/Test1/Test1.html1
-rw-r--r--src/components/Test2/Test2.html1
-rw-r--r--src/main.js10
4 files changed, 28 insertions, 0 deletions
diff --git a/src/App.html b/src/App.html
new file mode 100644
index 0000000..d1a4dc5
--- /dev/null
+++ b/src/App.html
@@ -0,0 +1,16 @@
+<label>Hello {{name}}!</label>
+Template : <Test1></Test1>
+Template : <Test2></Test2>
+<style>
+ h1 {
+ color: purple;
+ }
+</style>
+
+<script>
+ import Test1 from './components/Test1/Test1.html';
+ import Test2 from './components/Test2/Test2.html';
+ export default {
+ components :{Test1, Test2}
+ }
+</script> \ No newline at end of file
diff --git a/src/components/Test1/Test1.html b/src/components/Test1/Test1.html
new file mode 100644
index 0000000..a1ceaa2
--- /dev/null
+++ b/src/components/Test1/Test1.html
@@ -0,0 +1 @@
+<label>Test 1</label>
diff --git a/src/components/Test2/Test2.html b/src/components/Test2/Test2.html
new file mode 100644
index 0000000..c12c1a5
--- /dev/null
+++ b/src/components/Test2/Test2.html
@@ -0,0 +1 @@
+<label>Test 2</label> \ No newline at end of file
diff --git a/src/main.js b/src/main.js
new file mode 100644
index 0000000..9af70cb
--- /dev/null
+++ b/src/main.js
@@ -0,0 +1,10 @@
+import App from './App.html';
+
+const app = new App({
+ target: document.body,
+ data: {
+ name: 'This is my name'
+ }
+});
+
+export default app; \ No newline at end of file