Commit Graph

468 Commits

Author SHA1 Message Date
Pim
e8993eac99 chore: lint all template files (#4130) 2018-10-23 10:22:59 +03:30
Pooya Parsa
9c1e0d1743 feat: migrate nuxt into monorepo (#4051)
Co-authored-by: Clark Du <clark.duxin@gmail.com>
Co-authored-by: Pooya Parsa <pooya@pi0.ir>
2018-10-18 00:58:25 +03:30
Vladlen
a359424741 refactor(router): reduce duplicate code in routes.js (#4121) 2018-10-17 01:26:43 +03:30
Alexander Lichter
76b10d2d3f refactor: use more functional programming (#3612) 2018-10-13 02:01:19 +03:30
Jonas Galvez
a3dd7dad6b feat: configurable global name (#4012)
Co-authored-by: JuliaNeumann <jn.julianeumann@gmail.com>
2018-10-09 15:38:33 +03:30
ousiri
d603b0d418 feat: allow nuxt-child to pass keep-alive props to keep-alive (#4067)
Adds the ability to configure the props of keep-alive on nuxt-child.

## Types of changes
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [x] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)


## Description
In development, I found it impossible to configure the props of keep-alive when using nuxt-child, like ```exclude```. This PR adds a special prop to nuxt-child named keepAliveProps to allow developer to configure it.

```html
<template>
  <div>
    <nuxt-child keep-alive :keep-alive-props="{ exclude: ['modal'] }">
  </div>
</template>
```

## Checklist:
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly. (PR: https://github.com/nuxt/docs/pull/836)
- [ ] I have added tests to cover my changes (if not applicable, please state why)
- [x] All new and existing tests are passing.
2018-10-08 14:27:36 +01:00
Felipe Lübe de Bragança
232bc0196f feat: missing pages directory warning (#4054)
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [x] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)


## Description
Resolves #3920 by adding a warning during the build process and a small disclaimer into the default page component.


## Checklist:
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly. (PR: #)
- [x] I have added tests to cover my changes (if not applicable, please state why)
- [x] All new and existing tests are passing.
2018-10-05 13:37:55 +01:00
Lajos Veres
74eb5a6302 * Typofixes - https://github.com/vlajos/misspell-fixer (#4013) 2018-09-29 22:05:20 +02:00
Dmitry Molotkov
df148a896e fix: properly serialize undefined in vuex store (#3913)
* allow to serialize undefined variable in vuex store

* test properly

* fix test

* lock
2018-09-25 10:51:07 +02:00
Tatsuyuki Ishi
55a153c7d0 fix: expose loading.throttle as an option (#3953) 2018-09-24 18:30:22 +01:00
Alexander Lichter
054ea7931a refactor: client store code style (#3683) 2018-09-24 02:15:44 +03:30
Clark Du
411bb1904e refactor: always use process.client instead of process.browser (#3910) 2018-09-19 13:30:23 +04:30
Tatsuyuki Ishi
d1f6f0dc09 loading: add throttle option to skip progress for fast loads (#3886)
* loading: add throttle option to skip progress for fast loads

* Disable some tests relying on internals
2018-09-18 18:16:27 +02:00
Sébastien Chopin
6975655d78
feat: Overwrite store.registerModule (#3909)
* feat: Overwrite store.registerModule

Make `store.registerModule` works seamlessly with server-side rendering.

* fix: test failure
2018-09-18 17:21:25 +02:00
Ahad Birang
bceddf5bcf feat(router): add support for props and alias (#3818) 2018-09-01 09:03:28 +04:30
Pooya Parsa
87d303845f chore: remove extra validationError
as @clarkdo mentioned
2018-08-25 21:56:42 +04:30
Jonas Galvez
608b913b8a feat: async validate() (#3797) 2018-08-25 14:12:00 +04:30
Clark Du
3f7c5f64ed
fix: async fetch and asyncData not trigger ErrorHandler (#3781) 2018-08-22 14:10:43 +01:00
Clark Du
b35126d68c
fix: ie11 loading indicator not centering (#3779) 2018-08-22 14:10:31 +01:00
Clark Du
ef85723fe6
fix: error page rendering before redirect (#3782)
* fix: error page rendering before redirect

* fix: cancel redirect after redirect to external link

* refactor: simplify ERR_REDIRECT

* refactor: simplify ERR_REDIRECT

* refactor: trigger routeChanged when redirect external link
2018-08-22 14:10:18 +01:00
Sébastien Chopin
bba9e2bae0 fix: Show error page if error on layout 2018-08-21 16:50:31 +02:00
Jonas Galvez
97910de3ec Improve hooks in nuxt.config.js (#3766)
* Improve hooks in nuxt.config.js

* No mult-line for
2018-08-20 14:19:09 +02:00
Alexander Lichter
e26f23b74a feat: respect beforeEnter for route if set (#3760)
* feat: respect beforeEnter for route if set

* test: add redirecting beforeEnter function and test
2018-08-18 18:15:37 +02:00
Jonas Galvez
280983fa88 fix: remove string interpolation from App.js (#3750)
In migrating an `1.4.2` app to edge, I came across this bug:

```
✖ fatal Error: Could not compile template /Users/jonas/.../node_modules/nuxt-edge/lib/app/App.js: layout is not defined
```

Upon much investigation, I traced it to the string interpolation used in the `App.js` template. I replaced with regular concatenation and the error was gone.
2018-08-17 09:22:52 +01:00
Alexander Lichter
f9637a1c86 fix: trigger watch query on trailing slash change (#3695) 2018-08-15 15:24:28 +02:00
Jonas Galvez
e6e8adb671 Minor consistency tweaks (#3726) 2018-08-15 15:23:03 +02:00
Clark Du
5ddc394a50
fix: return 404 if extendRoutes without Component (#3608)
resolve #3351
2018-08-13 17:27:20 +01:00
Alexander Lichter
1ec5cf7b1c lint: force if braces, no lonely ifs and add store.js (#3685)
* lint: add curly and no-lonely-if

* lint: add lib/app/store.js to eslint config
2018-08-11 00:24:53 +01:00
Clark Du
9b060f3be1
feat: upgrade to Babel 7 (#3667) 2018-08-10 14:45:58 +01:00
Alexander Lichter
cb18aa6f53 feat: add Vue.config configuration to nuxt.config.js (#3655)
After #3564 and the request of #3427  (plus #3452) I decided to add a dedicated `vueConfig`object to the `nuxt.config.js` file.

The keys will be projected on Vue.config.

By default, `Vue.config.performance` is enabled in dev mode, `Vue.config.silent` is enabled in production mode.

Doc PR incoming.

Resolves: #2910, #3427
2018-08-08 20:05:23 +01:00
HANATANI Takuma
69ea8e9662 Replace background-color to background in loadingIndicator (#3656) 2018-08-08 18:15:15 +02:00
Clark Du
6aaf839d54
feat: call global vue errorHandler in fetch and asyncData (#3652)
resolve #3335
2018-08-08 11:11:08 +01:00
HANATANI Takuma
ba7e6c735b Use original vue-ssr instead of copy (#3644) 2018-08-07 02:58:33 +02:00
Jonas Galvez
fe9dd166df Fixed conflicts 2018-08-06 06:45:39 -03:00
Jonas Galvez
6db42ffbb5 hotfix (#3634) 2018-08-06 11:32:39 +02:00
Jonas Galvez
3f1d634fb7 Consistent parens in arrow functions (#3630)
* Minor consistency enhancements

* Arrow parenthesis consistency

* Change linting rule

* Fix typo

* Update .eslintrc.js to only require parens for blocks

* Update style according to brace-only suggestion

* Remove --fix from lint

* Tweak no-loading time (failing test)

* Tweak no-loading time (failing test) (2)

* Tweak no-loading time (failing test) (3)

* Tweak no-loading time (failing test) (4)

* Tweak no-loading time (failing test) (5)
2018-08-06 02:12:44 +02:00
Jonas Galvez
0e42e98751 Add loading: false option to pages (#3629)
* Add hasManualLoading

* Add hasManualLoading (2)

* Debugging

* Debugging (2)

* Change 'manual' to false

* Add custom-page-loading example

* Add custom-page-loading example (2)

* Changed approach

* Added custom-page-loading/README.md

* Change running loading time in about.vue

* Patch loadAsyncComponents

* Added final page

* Changed approach (2)

* Fixed example

* Fixed example (2)

* Fix example package name

* Linting

* Improved examples (more to the point)

* Linting (2)

* Fix typo

* Adjust indentation

* Added noloading.vue to basic fixture

* Added noloading tests

* Linting (3)

* Debugging test

* Linting (4)

* Debugging test (2)

* Debugging test (3)
2018-08-05 23:56:49 +02:00
Alexander Lichter
e814b34508 feat: enable silent config when not in debug mode (#3564) 2018-07-23 08:59:41 +01:00
Alexander Lichter
095404a251 refactor: change function calls when arity is one (#3563) 2018-07-20 16:42:31 +01:00
GU Yiling
b5f6ed1332 fix: inject scrollBehavior in a more tolerant way (#3560)
Currently we cannot define `scrollBehavior` like:

```js
scrollBehavior () { // ← we can have space before the parenthesis
  // ...
}
```

Fixed this by using a `RegExp` to be more tolerant.
2018-07-20 16:26:03 +01:00
Clark Du
22a53464a7
fix: allow quotes in messages (#3525) 2018-07-12 21:45:14 +01:00
ktsn
bf6416ae62 fix: ensure emit triggerScroll event after scrollBehavior is called 2018-06-21 15:22:52 +09:00
Igor
937ce612c7 feat(csr): support custom Vue.config.errorHandler (#3337) 2018-06-02 19:16:57 +04:30
Sébastien Chopin
fe30ef3525 fix: Use Component instead of paths 2018-05-04 11:36:10 +02:00
Sébastien Chopin
c6553a39cd fix: #2854 2018-05-04 10:32:26 +02:00
Pooya Parsa
8feeeb0cfe Revert "feat: add webpackPrefetch to initial async chunk options (webpack 4.6.0)"
This reverts commit 09b141efa4.
2018-05-02 14:29:55 +04:30
Pooya Parsa
aec6828892 feat: add webpackPrefetch to initial async chunk options (webpack 4.6.0) 2018-05-02 14:29:55 +04:30
rockywu 吴佳雷
3e62642908 add extendRoutes Support for meta properties 2018-04-18 15:20:37 +08:00
Clark Du
918ce3c15f
refactor: make createRouter support async 2018-04-17 15:09:50 +08:00
Jordan Ramstad
869fdc2c25
Update router to allow async functions 2018-04-13 12:22:35 -06:00