Commit Graph

57 Commits

Author SHA1 Message Date
Alexander Lichter
d69b4b8b12 feat: abstract minify and use value for all modes (#3965)
* feat: abstract minify and use value for all modes

* change name to htmlMinify

* only override htmlMinify with legacy value in generate mode

* Use default options for htmlMinify and add override info to warning

* Remove redundant minification settings

* Override minification settings in generator

* Cleanup and add TODO for nuxt 3

* Improve warning

* set default minify option to "true"

* make tests pass again

* remove the culprit

* replace htmlMinify with html.minify
2018-09-30 18:12:38 +02:00
Sébastien Chopin
879ea846a4 fix: Display stack when unhandled error when generating a route 2018-09-19 12:40:05 +02:00
Pim
226b90d4ae fix: prevent removing project by mistake due to build or generate paths (#3869) 2018-09-14 11:36:44 +04:30
Pim
43f639b88e fix: fallback should always be a string (#3792)
The SPA fallback option should always be a string, if the user configuration was specifed as boolean true it should have been replaced by the default string value (currently 404.html) in lib/common/options.js

Added test on empty string

Added missing test for spa-fallback.html
2018-08-23 19:33:02 +02:00
Tatsuyuki Ishi
716c04f4e9 Isolate client and server artifacts (#3758) 2018-08-20 18:04:55 +02:00
Alexander Lichter
52d9629bac eslint: Prefer const over let (#3650) 2018-08-08 12:54:05 +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
HANATANI Takuma
ff32dbdb09 Fix GitHub capitalize (#3623) 2018-08-01 18:07:43 +02:00
Pooya Parsa
0ca99426c9 chore: remove unnecessary scopes 2018-04-02 00:50:46 +04:30
Pooya Parsa
5e595e7e66 misc: improve cli 2018-04-01 00:26:38 +04:30
Pooya Parsa
526a647ce1 misc: improve cli 2018-03-31 23:28:04 +04:30
Pooya Parsa
25741f5a1f refactor: use consola for all console stuff 2018-03-31 21:21:55 +04:30
Pooya Parsa
59ff0df052 feat: use consola for logging 2018-03-31 20:52:14 +04:30
Clark Du
ef7a42649d misc: improve coverage and packaging (#3121)
nuxt-start and nuxt/legacy are also coming!
2018-03-28 02:58:17 +04:30
Pooya Parsa
6234ae84c0 refactor(core): use strict mjs 2018-03-16 22:41:24 +03:30
Pooya Parsa
f20ad95b2b remove pretty-error
https://github.com/standard-things/esm/wiki/improved-errors
2018-03-16 20:32:56 +03:30
Pooya Parsa
53e98a958c feat: rewrite core to esm 2018-03-16 19:42:06 +03:30
Pooya Parsa
f2b3e780e0 improve spinner 2018-03-16 09:56:23 +03:30
Pooya Parsa
49ba546730 route -> generate ERR 2018-03-13 21:00:15 +03:30
Pooya Parsa
3053431d79 generate errors 2018-03-13 20:49:39 +03:30
Pooya Parsa
ca525200ca logs for generator 2018-03-13 20:46:12 +03:30
Ricardo Gobbo de Souza
536aab6380 Moved options to a new dir block: 2018-02-03 14:04:15 -02:00
Ricardo Gobbo de Souza
483cd9ea29 feat: custom static directory 2018-02-03 09:54:16 -02:00
Jeroen Visser
f0784ad7fc
Add SPA fallback template 2018-01-30 00:30:26 +01:00
Pooya Parsa
118d3fb8c2 imrpove nuxt-generate error report summary 2018-01-11 21:50:35 +03:30
pimlie
0f4bf0f9b2 Revert cc74126
The generate:routeCreated hook still existed but probably not in the expected place
2017-12-17 16:46:14 +03:30
dsandor
cc74126fa6 Replace code that was removed by commit: 65f4a030f4 2017-12-13 04:45:17 +03:30
Pooya Parsa
9b8cbed512 perf: remove rollup build
Using native node 8.x for less transpilations
2017-12-12 13:12:29 +03:30
pimlie
adc7260c76 Fix cannot read property of undefined when not building 2017-11-29 21:20:33 +03:30
pimlie
5bacd36590 Add possibility to pass extra arguments to generate.routes method 2017-11-27 18:10:24 +03:30
Pim
65f4a030f4 refactor generator + cli tests (#2205)
* Rename this.generateRoutes to this.staticRoutes

* Refactor generator to separate logic

* Move routeCreated hook to generateRoute

Add routeFailed hook for unhandled exceptions

Keep page errors separately until page hooks have been called

* Move debug and report statements to hooks

* pageErrors can be a const

Push pageErrors to errors

* fix done hook, errors are 2nd param

* Add generator hooks to nuxt-build for spa mode

* Added a cli integration test for bin/nuxt-(build|start|generate)

* Removed unnecessary waitFor

* Use pify instead util.promisify for v6 compatibility

* Fix windows build

You cant execute .js files directly on Windows/Appveyor so call node with nuxt-*.js file as argument

* Fix windows build (2)

Use correct folder separators in text search

* Fix possible timing quirck in children.path.test
2017-11-24 02:01:54 +03:30
Sébastien Chopin
2c2ee63dd1
Merge pull request #2032 from Gomah/dev
feat: add subFolders option for generate
2017-11-16 16:16:22 +01:00
David Sandor
715ff581b9 use the new hooks system instead of a plugin. 2017-11-16 06:04:39 -05:00
David Sandor
9aa6722512 Include errors, this is useful in reporting success % 2017-11-16 05:50:14 -05:00
David Sandor
1c4978db4f Add tappable plugin call after route generated. 2017-11-16 05:44:34 -05:00
Gomah
59ad478037 Add subFolders option for generate 2017-11-06 18:36:28 +11:00
Atinux
42073db289 fix: Remove useless console.log 2017-11-03 12:32:57 +01:00
Sébastien Chopin
fe0ad908b7 hook: Add generate:page hook 2017-10-30 23:14:21 +01:00
Sébastien Chopin
94ad5955e6 Hooks ready to be tested 2017-10-30 22:39:08 +01:00
Atinux
6648695015 refacto: Hooks 2017-10-30 18:41:22 +01:00
Clark Du
f5acb6fc0e fix: syntax error in generator.js 2017-10-25 15:35:33 +03:30
pimlie
72529c69da dont assume /index.html exists 2017-10-23 23:43:59 +02:00
Pooya Parsa
81fcc70eca don't overwrite if 200.html already exists 2017-08-18 21:01:55 +04:30
Sebastien Chopin
d96a48c3b4 fix typo 2017-08-18 15:46:48 +02:00
Pooya Parsa
7feeedd432 call forGenerate before modules ready 2017-08-18 17:57:58 +04:30
Pooya Parsa
fbb6833400 remove SSR related files from generate artifacts 2017-08-18 16:14:47 +04:30
Sebastien Chopin
42d967c27b Add process.generate 2017-08-17 14:43:51 +02:00
Pooya Parsa
85e7f25326 generate -> generator 2017-07-30 18:42:08 +04:30
Pooya Parsa
b5ca6b7975 feat: enhance tapables usage 2017-07-17 23:56:41 +04:30
Sébastien Chopin
270c490a9d Add generate.concurrency option 2017-07-09 12:00:08 +02:00