create-mettle-app 1.0.1 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mettle-app",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "license": "MIT",
5
5
  "author": "maomincoding",
6
6
  "bin": {
@@ -14,6 +14,6 @@
14
14
  "vite-plugin-babel": "^1.1.3"
15
15
  },
16
16
  "dependencies": {
17
- "mettle": "^0.3.1"
17
+ "mettle": "^0.5.0"
18
18
  }
19
19
  }
@@ -1,5 +1,5 @@
1
1
  p {
2
- color: #c6715b;
2
+ color: #6c2de4;
3
3
  }
4
4
 
5
5
  .inner {
@@ -10,5 +10,5 @@ p {
10
10
  width: 400px;
11
11
  margin: 0 auto;
12
12
  padding: 10px;
13
- border: 1px dotted #c6715b;
13
+ border: 1px dotted #6c2de4;
14
14
  }
@@ -9,7 +9,7 @@
9
9
  font-weight: bold;
10
10
  padding: 10px;
11
11
  margin: 10px 0;
12
- background-color: #c6715b;
12
+ background-color: #6c2de4;
13
13
  color: #fff;
14
14
  border-radius: 20px;
15
15
  animation: my1 1s ease-in;
@@ -14,7 +14,7 @@
14
14
  "vite-plugin-babel": "^1.1.3"
15
15
  },
16
16
  "dependencies": {
17
- "mettle": "^0.3.1",
17
+ "mettle": "^0.5.0",
18
18
  "mettle-router": "^0.2.0"
19
19
  }
20
20
  }
@@ -1,13 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>create-mettle-app</title>
7
- </head>
8
3
 
9
- <body>
10
- <div id="app"></div>
11
- <script type="module" src="/src/main.js"></script>
12
- </body>
13
- </html>
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>create-mettle-app</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="app"></div>
12
+ <script type="module" src="/src/main.jsx"></script>
13
+ </body>
14
+
15
+ </html>
@@ -8,13 +8,10 @@
8
8
  "build": "vite build"
9
9
  },
10
10
  "devDependencies": {
11
- "@babel/core": "^7.20.7",
12
- "babel-plugin-jsx-to-mettle": "^0.1.2",
13
- "babel-plugin-mettle": "^0.1.2",
14
- "vite": "^4.0.0",
15
- "vite-plugin-babel": "^1.1.3"
11
+ "vite": "^6.1.0",
12
+ "vite-plugin-mettle": "^0.0.1"
16
13
  },
17
14
  "dependencies": {
18
- "mettle": "^0.3.1"
15
+ "mettle": "^0.5.0"
19
16
  }
20
17
  }
@@ -1,5 +1,5 @@
1
1
  p {
2
- color: #c6715b;
2
+ color: #6c2de4;
3
3
  }
4
4
 
5
5
  .inner {
@@ -10,5 +10,5 @@ p {
10
10
  width: 400px;
11
11
  margin: 0 auto;
12
12
  padding: 10px;
13
- border: 1px dotted #c6715b;
13
+ border: 1px dotted #6c2de4;
14
14
  }
@@ -9,7 +9,7 @@
9
9
  font-weight: bold;
10
10
  padding: 10px;
11
11
  margin: 10px 0;
12
- background-color: #c6715b;
12
+ background-color: #6c2de4;
13
13
  color: #fff;
14
14
  border-radius: 20px;
15
15
  animation: my1 1s ease-in;
@@ -1,14 +1,6 @@
1
1
  import { defineConfig } from 'vite';
2
- import babel from 'vite-plugin-babel';
2
+ import mettle from 'vite-plugin-mettle';
3
3
 
4
4
  export default defineConfig({
5
- // options
6
- server: {
7
- strictPort: true,
8
- port: 3002,
9
- },
10
- plugins: [
11
- // Babel will try to pick up Babel config files (.babelrc or .babelrc.json)
12
- babel(),
13
- ],
5
+ plugins: [mettle()],
14
6
  });
@@ -1,13 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>create-mettle-app</title>
7
- </head>
8
3
 
9
- <body>
10
- <div id="app"></div>
11
- <script type="module" src="/src/main.js"></script>
12
- </body>
13
- </html>
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>create-mettle-app</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="app"></div>
12
+ <script type="module" src="/src/main.jsx"></script>
13
+ </body>
14
+
15
+ </html>
@@ -8,14 +8,11 @@
8
8
  "build": "vite build"
9
9
  },
10
10
  "devDependencies": {
11
- "@babel/core": "^7.20.7",
12
- "babel-plugin-jsx-to-mettle": "^0.1.2",
13
- "babel-plugin-mettle": "^0.1.2",
14
- "vite": "^4.0.0",
15
- "vite-plugin-babel": "^1.1.3"
11
+ "vite": "^6.1.0",
12
+ "vite-plugin-mettle": "^0.0.1"
16
13
  },
17
14
  "dependencies": {
18
- "mettle": "^0.3.1",
15
+ "mettle": "^0.5.0",
19
16
  "mettle-router": "^0.2.0"
20
17
  }
21
18
  }
@@ -1,14 +1,6 @@
1
1
  import { defineConfig } from 'vite';
2
- import babel from 'vite-plugin-babel';
2
+ import mettle from 'vite-plugin-mettle';
3
3
 
4
4
  export default defineConfig({
5
- // options
6
- server: {
7
- strictPort: true,
8
- port: 3002,
9
- },
10
- plugins: [
11
- // Babel will try to pick up Babel config files (.babelrc or .babelrc.json)
12
- babel(),
13
- ],
5
+ plugins: [mettle()],
14
6
  });
@@ -13,6 +13,6 @@
13
13
  "vite-plugin-mettle": "^0.0.1"
14
14
  },
15
15
  "dependencies": {
16
- "mettle": "^0.3.1"
16
+ "mettle": "^0.5.0"
17
17
  }
18
18
  }
@@ -1,5 +1,5 @@
1
1
  p {
2
- color: #c6715b;
2
+ color: #6c2de4;
3
3
  }
4
4
 
5
5
  .inner {
@@ -10,5 +10,5 @@ p {
10
10
  width: 400px;
11
11
  margin: 0 auto;
12
12
  padding: 10px;
13
- border: 1px dotted #c6715b;
13
+ border: 1px dotted #6c2de4;
14
14
  }
@@ -9,7 +9,7 @@
9
9
  font-weight: bold;
10
10
  padding: 10px;
11
11
  margin: 10px 0;
12
- background-color: #c6715b;
12
+ background-color: #6c2de4;
13
13
  color: #fff;
14
14
  border-radius: 20px;
15
15
  animation: my1 1s ease-in;
@@ -13,7 +13,7 @@
13
13
  "vite-plugin-mettle": "^0.0.1"
14
14
  },
15
15
  "dependencies": {
16
- "mettle": "^0.3.1",
16
+ "mettle": "^0.5.0",
17
17
  "mettle-router": "^0.2.0"
18
18
  }
19
19
  }
@@ -1,8 +1,9 @@
1
1
  import { defineComponent } from 'mettle';
2
2
  import { linkTo } from 'mettle-router';
3
+ import type { OptionsProps } from 'mettle';
3
4
 
4
5
  const home = () =>
5
- defineComponent(({ setData }) => {
6
+ defineComponent(({ setData }:OptionsProps) => {
6
7
  const state = {
7
8
  msg: 'hello',
8
9
  arr: [1, 2],
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- plugins: [['babel-plugin-jsx-to-mettle'], ['babel-plugin-mettle']],
3
- };
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- plugins: [['babel-plugin-jsx-to-mettle'], ['babel-plugin-mettle']],
3
- };
File without changes