Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to last Vue CLI v3 template #297

Merged
merged 47 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d6ba287
Fixed a typo
sronveaux Apr 20, 2022
f3f0bb2
Added a few lines to stick with the source template
sronveaux Apr 20, 2022
4619cf9
Changed eslint-html-plugin to eslint-vue-plugin
sronveaux Apr 20, 2022
ee7aff8
Changed import style to conform to source template
sronveaux Apr 20, 2022
51a0b49
Changed import style and var usage to conform to source templates
sronveaux Apr 20, 2022
01b99e8
Changed import style, var usage and arrow functions to conform to sou…
sronveaux Apr 20, 2022
e82af80
Removed some packages and added others to stay in tune with source te…
sronveaux Apr 20, 2022
5edb0c4
Added the first version of the new webpack config files
sronveaux Apr 20, 2022
b6ab124
Corrected a bug linked to babel-eslint-parser
sronveaux Apr 20, 2022
b75d91a
Added the possibility to open the browser specified in the config/ind…
sronveaux Apr 20, 2022
909b7eb
Removed opn which is installed as peer dependency now
sronveaux Apr 21, 2022
66a889b
Corrected a bug linked to serving static files while in development mode
sronveaux Apr 21, 2022
1b28a45
Removed the now useless build scripts
sronveaux Apr 21, 2022
c11e37b
Added a useless <div> tag so that vue-eslint stops complaining about it
sronveaux Apr 21, 2022
77b0b75
Fixed a lot of lint errors now that vue-eslint works as expected
sronveaux Apr 21, 2022
abbf7cc
Resetted the package-lock.json to avoid a small incompatibility with …
sronveaux Apr 21, 2022
ee51e31
Upgraded the first files to the new vue-CLI V3 format
sronveaux Apr 25, 2022
91c3174
Made changes to conform to new linting configuration format
sronveaux Apr 25, 2022
a9cdcd2
Corrected an indentation error returned by ESLint
sronveaux Apr 25, 2022
40b7ce7
Converted the Babel and postCSS config files to the new format
sronveaux Apr 25, 2022
012547d
Moved the index.html and embedded.html files to the public directory.…
sronveaux Apr 25, 2022
cb96ffe
Added a first version of the vue.config.js file
sronveaux Apr 25, 2022
d5e6ade
Changed the dev and build script to conform to the Vue-CLI V3 format
sronveaux Apr 25, 2022
cf19d16
Added two Babel polyfills needed as the project was reverted to core-…
sronveaux Apr 25, 2022
1bed884
Added eslint-formatter-friendly again to avoid a warning reporting bu…
sronveaux Apr 26, 2022
a468846
Changed the main.js to conform to new Vue-CLI template and to Vue bes…
sronveaux Apr 26, 2022
e7762ef
Changed the vue.config.js to have the favicon working again
sronveaux Apr 26, 2022
ff0c8c1
Commented an ESLint rule as wegue main script uses console logs to re…
sronveaux Apr 26, 2022
a141396
Changed README.md to reflect the new npm commands syntax
sronveaux Jul 26, 2022
611764b
Renamed test directory to tests as in the new Vue-CLI template
sronveaux Jul 26, 2022
491a787
Added updated Karma back in the project
sronveaux Jul 26, 2022
028e20c
Changed the path to the Webpack config file in karma.conf.js
sronveaux Jul 26, 2022
5a8caaf
Removed the now useless build and config directories
sronveaux Jul 26, 2022
76e21db
Added the source map configuration to reflect what was done before
sronveaux Jul 26, 2022
ede4680
Added cross-env back and added the npm script to run tests through Karma
sronveaux Jul 26, 2022
3e439b7
Added babel-plugin-istanbul and changed the babel.config.js to make c…
sronveaux Jul 26, 2022
2183fea
Changed a test and made it async to avoid a new strange bug(https://g…
sronveaux Jul 26, 2022
a5a09e7
Changed a forgotten file to use correct test files
sronveaux Jul 29, 2022
4fefd3b
changed an npm script to point to correct test directory
sronveaux Jul 29, 2022
0b9480c
Changed two commands in the documentation
sronveaux Jul 29, 2022
a80ed56
Merged official master branch before amending this branch following d…
sronveaux Oct 3, 2022
e8f1475
Added unit tests coverage reporrts to .gitignore and .dockerignore files
sronveaux Oct 3, 2022
b78606d
Made Karma the default test runner and removed the Vue CLI mocha-webp…
sronveaux Oct 3, 2022
edf6427
Changed the command used to run development server inside the Worksho…
sronveaux Oct 3, 2022
dad49c4
Reintroduced the min engine requirements to conform to Vue-CLI V3 rec…
sronveaux Oct 4, 2022
4480fe3
Set APP resolver alias to base configuration instead of test configur…
sronveaux Oct 4, 2022
4a3b2a2
Added mocha environment in the .eslintrc.js file
sronveaux Oct 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .babelrc

This file was deleted.

2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> 1%
last 2 versions
8 changes: 2 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
root = true

[*]
charset = utf-8
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
insert_final_newline = true
5 changes: 3 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/*.js
config/*.js
/build/
/config/
/test/unit/coverage/
42 changes: 22 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
// http://eslint.org/docs/user-guide/configuring

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
node: true,
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
extends: [
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
fschmenger marked this conversation as resolved.
Show resolved Hide resolved
'@vue/standard'
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 'off',
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
rules: {
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',

// allow semicolons and the end of a statement
'semi': 'off',

Expand All @@ -40,5 +29,18 @@ module.exports = {
'padded-blocks': process.env.NODE_ENV === 'development' ? 'warn' : 'error',
'keyword-spacing': process.env.NODE_ENV === 'development' ? 'warn' : 'error',
'arrow-spacing': process.env.NODE_ENV === 'development' ? 'warn' : 'error'
}
},
parserOptions: {
parser: 'babel-eslint',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)'
],
env: {
mocha: true
}
}
]
fschmenger marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:

- run: npm install
- run: npm run init:app
- run: npm run test
- run: npm run test:karma
15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
.DS_Store
node_modules/
dist/
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
test/unit/coverage

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sln
*.sw?
2 changes: 1 addition & 1 deletion .gitpod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ports:
onOpen: open-preview
tasks:
- init: npm install && npm run init:app
command: npm run dev
command: npm run serve
vscode:
extensions:
- dbaeumer.vscode-eslint
8 changes: 0 additions & 8 deletions .postcssrc.js

This file was deleted.

28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ npm run init:app

``` bash
# serve with hot reload at localhost:8081
npm run dev
npm run serve
```

### Unit tests

To run all unit tests execute the following:
To run all unit tests using Karma test runner execute the following:

``` bash
# run all tests
npm test
npm test:karma
```

NB the unit tests require Chrome or Chromium browser executable to be found.
Expand All @@ -82,7 +82,25 @@ Run the build script in order to create a production build, which can be copied
npm run build
```

For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
### Linting your files

Run the lint script in order to lint all your files without fixing the errors. The problems will be reported in the console only.

``` bash
npm run lint
```

### Linting and fixing your files

Run the lint script in order to lint all your files and fix the errors at the same time.

``` bash
npm run lint:fix
```

### Customize configuration

See [Configuration Reference](https://cli.vuejs.org/config/).

## Run with Docker

Expand Down Expand Up @@ -139,6 +157,6 @@ You need professional support or teachings for Wegue? Please contact a service p

## Credits

The basic project setup was created by https://github.com/vuejs-templates/webpack.
The basic project setup was created with [Vue CLI](https://cli.vuejs.org).

Thanks for this great template! :+1:
14 changes: 7 additions & 7 deletions app-starter/WguApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
</template>

<script>
import WguAppTemplate from './WguAppTemplate.vue';
export default {
name: 'my-wgu-app',
components: {
'wgu-app-tpl': WguAppTemplate
}
// add Vue methods and hooks here
import WguAppTemplate from './WguAppTemplate.vue';
export default {
name: 'my-wgu-app',
components: {
'wgu-app-tpl': WguAppTemplate
}
// add Vue methods and hooks here
}
</script>
Loading