Get ready for using Vue.js

This commit is contained in:
Pig Fang 2018-07-25 15:32:08 +08:00
parent 148b6f6cc5
commit f6dec9d447
8 changed files with 2564 additions and 61 deletions

View File

@ -9,5 +9,5 @@ indent_style = space
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.{php,js,md,styl,tpl}] [*.{php,js,md,styl,tpl,vue}]
indent_size = 4 indent_size = 4

View File

@ -2,3 +2,4 @@ node_modules/
resources/assets/dist/ resources/assets/dist/
resources/assets/src/vendor/ resources/assets/src/vendor/
gulpfile.js gulpfile.js
public/

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
"extends": "eslint:recommended", "extends": ["eslint:recommended", "plugin:vue/essential"],
"rules": { "rules": {
"linebreak-style": ["error", "unix"], "linebreak-style": ["error", "unix"],
"quotes": ["warn", "single"], "quotes": ["warn", "single"],
@ -29,8 +29,11 @@ module.exports = {
"TexturePreview": false, "TexturePreview": false,
"handleDataTablesAjaxError": false "handleDataTablesAjaxError": false
}, },
"parser": "vue-eslint-parser",
"parserOptions": { "parserOptions": {
"ecmaVersion": 2017 "ecmaVersion": 2018,
"sourceType": "module",
"parser": "babel-eslint"
}, },
"root": true, "root": true,
"env":{ "env":{

3
.gitignore vendored
View File

@ -3,6 +3,7 @@
.sass-cache .sass-cache
coverage coverage
.idea/ .idea/
.cache/
vendor/* vendor/*
storage/textures/* storage/textures/*
storage/update_cache/* storage/update_cache/*
@ -10,4 +11,4 @@ node_modules/*
yarn-error.log yarn-error.log
_ide_helper.php _ide_helper.php
.phpstorm.meta.php .phpstorm.meta.php
public/

View File

@ -29,7 +29,8 @@ class AppServiceProvider extends ServiceProvider
// Provide some application information for javascript // Provide some application information for javascript
$blessing = array_merge(array_except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [ $blessing = array_merge(array_except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [
'base_url' => url('/'), 'base_url' => url('/'),
'site_name' => option_localized('site_name') 'site_name' => option_localized('site_name'),
'route' => request()->path(),
]); ]);
$event->addContent('<script>var blessing = '.json_encode($blessing).';</script>'); $event->addContent('<script>var blessing = '.json_encode($blessing).';</script>');

View File

@ -10,17 +10,18 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "gulp build", "build": "parcel build -d public --no-source-maps resources/assets/src/components/bootstrap.js",
"lint": "gulp lint", "lint": "gulp lint",
"release": "gulp zip", "release": "gulp zip",
"test": "jest --verbose", "test": "jest --verbose",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"test:coverage": "jest --verbose --coverage --coverageDirectory ./coverage/", "test:coverage": "jest --verbose --coverage --coverageDirectory ./coverage/",
"codecov": "codecov -F js", "codecov": "codecov -F js",
"dev": "gulp watch" "dev": "parcel watch -d public resources/assets/src/components/bootstrap.js"
}, },
"dependencies": { "dependencies": {
"admin-lte": "^2.4.2", "admin-lte": "^2.4.2",
"axios": "^0.18.0",
"bootstrap": "^3.3.7", "bootstrap": "^3.3.7",
"bootstrap-fileinput": "^4.4.7", "bootstrap-fileinput": "^4.4.7",
"chart.js": "^2.7.1", "chart.js": "^2.7.1",
@ -31,17 +32,24 @@
"icheck": "^1.0.2", "icheck": "^1.0.2",
"jqPaginator": "^1.2.0", "jqPaginator": "^1.2.0",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"lodash.debounce": "^4.0.8",
"regenerator": "^0.12.3", "regenerator": "^0.12.3",
"skinview3d": "^1.1.0-alpha.2", "skinview3d": "^1.1.0-alpha.2",
"sweetalert2": "^6.11.5", "sweetalert2": "^6.11.5",
"toastr": "^2.1.4" "toastr": "^2.1.4",
"vue": "^2.5.16",
"vuejs-paginate": "^2.0.1"
}, },
"devDependencies": { "devDependencies": {
"@types/jquery": "^3.3.5",
"@vue/component-compiler-utils": "^2.1.0",
"babel-eslint": "^8.2.6",
"babel-plugin-transform-inline-environment-variables": "^0.2.0", "babel-plugin-transform-inline-environment-variables": "^0.2.0",
"babel-plugin-transform-remove-console": "^6.9.0", "babel-plugin-transform-remove-console": "^6.9.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"codecov": "^3.0.0", "codecov": "^3.0.0",
"del": "^3.0.0", "del": "^3.0.0",
"eslint-plugin-vue": "^4.7.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-babel": "^6.1.3", "gulp-babel": "^6.1.3",
"gulp-batch-replace": "^0.0.0", "gulp-batch-replace": "^0.0.0",
@ -55,8 +63,11 @@
"gulp-zip": "^4.1.0", "gulp-zip": "^4.1.0",
"jest": "^20.0.4", "jest": "^20.0.4",
"merge2": "^1.2.1", "merge2": "^1.2.1",
"parcel-bundler": "^1.9.7",
"run-sequence": "^2.2.1", "run-sequence": "^2.2.1",
"stylus": "^0.54.5" "stylus": "^0.54.5",
"vue-hot-reload-api": "^2.3.0",
"vue-template-compiler": "^2.5.16"
}, },
"jest": { "jest": {
"timers": "fake" "timers": "fake"

View File

@ -7,4 +7,5 @@ declare var blessing: {
site_name: string site_name: string
timezone: string timezone: string
version: string version: string
route: string
} }

2589
yarn.lock

File diff suppressed because it is too large Load Diff