Skip to content

Commit 23c4330

Browse files
committed
vue cli create project
1 parent f79d2e8 commit 23c4330

23 files changed

+461
-3
lines changed

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Vue.js Session
2-
==============
1+
Vue.js Basics
2+
=============
33

44
Installation
55
------------
@@ -9,10 +9,40 @@ Installation
99
- Install the Visual Studio Code [Vue Inline Template](https://marketplace.visualstudio.com/items?itemName=faisalhakim47.vue-inline-template) extension
1010

1111

12-
1312
Running
1413
-------
1514

15+
Running `01-HelloWorld` and `02-Snippets`:
1616
```
1717
npx http-server
1818
```
19+
20+
21+
Vue.js CLI
22+
==========
23+
24+
Installation
25+
------------
26+
27+
```
28+
npm install -g @vue/cli
29+
30+
vue --version
31+
vue create cli-socks
32+
```
33+
34+
35+
Usage
36+
-----
37+
38+
```
39+
cd cli-socks
40+
npm install
41+
npm run serve
42+
npm run build
43+
```
44+
45+
**Tests**:
46+
```
47+
npm run test:unit
48+
```

cli-socks/.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 8

cli-socks/.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: ["plugin:vue/essential", "@vue/prettier", "@vue/typescript"],
7+
rules: {
8+
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
10+
},
11+
parserOptions: {
12+
parser: "@typescript-eslint/parser"
13+
}
14+
};

cli-socks/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw*

cli-socks/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["@vue/app"]
3+
};

cli-socks/jest.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
moduleFileExtensions: ["js", "jsx", "json", "vue", "ts", "tsx"],
3+
transform: {
4+
"^.+\\.vue$": "vue-jest",
5+
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
6+
"jest-transform-stub",
7+
"^.+\\.tsx?$": "ts-jest"
8+
},
9+
transformIgnorePatterns: ["/node_modules/"],
10+
moduleNameMapper: {
11+
"^@/(.*)$": "<rootDir>/src/$1"
12+
},
13+
snapshotSerializers: ["jest-serializer-vue"],
14+
testMatch: [
15+
"**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
16+
],
17+
testURL: "http://localhost/",
18+
globals: {
19+
"ts-jest": {
20+
babelConfig: true
21+
}
22+
}
23+
};

cli-socks/package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "cli-socks",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint",
9+
"test:unit": "vue-cli-service test:unit"
10+
},
11+
"dependencies": {
12+
"vue": "^2.6.6",
13+
"vue-class-component": "^6.0.0",
14+
"vue-property-decorator": "^8.0.0",
15+
"vue-router": "^3.0.1",
16+
"vuex": "^3.0.1"
17+
},
18+
"devDependencies": {
19+
"@types/jest": "^23.1.4",
20+
"@vue/cli-plugin-babel": "^3.5.0",
21+
"@vue/cli-plugin-eslint": "^3.5.0",
22+
"@vue/cli-plugin-typescript": "^3.5.0",
23+
"@vue/cli-plugin-unit-jest": "^3.5.0",
24+
"@vue/cli-service": "^3.5.0",
25+
"@vue/eslint-config-prettier": "^4.0.1",
26+
"@vue/eslint-config-typescript": "^4.0.0",
27+
"@vue/test-utils": "1.0.0-beta.29",
28+
"babel-core": "7.0.0-bridge.0",
29+
"babel-eslint": "^10.0.1",
30+
"eslint": "^5.8.0",
31+
"eslint-plugin-vue": "^5.0.0",
32+
"node-sass": "^4.9.0",
33+
"sass-loader": "^7.1.0",
34+
"ts-jest": "^23.0.0",
35+
"typescript": "^3.2.1",
36+
"vue-template-compiler": "^2.5.21"
37+
}
38+
}

cli-socks/postcss.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
autoprefixer: {}
4+
}
5+
};

cli-socks/public/favicon.ico

1.12 KB
Binary file not shown.

cli-socks/public/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title>cli-socks</title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but cli-socks doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)