Commit Graph

39 Commits

Author SHA1 Message Date
Haoqun Jiang df00b3e0bc feat(GeneratorAPI): forceOverwrite option for extendPackage (#6307) 2021-02-23 14:44:22 +08:00
Superman a27e33bef8 fix: dependent package nickname (#6304) 2021-02-22 14:29:46 +08:00
Haoqun Jiang 4378c8df26 style: replace eslint-plugin-vue-libs with standard config (#6148) 2021-01-06 14:29:12 +08:00
Binwei Fang dc4c4559b6 fix(generator): avoid doing redundant write operations (#6011)
Avoid overwriting the file which is not modified when executing `vue add/invoke`
This will reduce the chance of encountering issues like #5939
2020-12-20 19:56:33 +08:00
Binwei Fang 91050b09f5 refactor(generator): minor refactor afterInvoke/afterAnyInvoke (#5993)
make afterInvoke/afterAnyInvoke code more readable and add test
2020-12-18 20:47:27 +08:00
Haoqun Jiang 5d002ccb07 fix: do not throw when api.render is called from an anonymous function (#5801)
Fixes #4774
2020-08-24 15:44:25 +08:00
Cédric Exbrayat 5cb988cb27 fix(GeneratorAPI): remove warning when using extendPackage with prune (#5202)
Currently, if we use `api.extendPackage({foo: null}, {prune: true})` the dependency is removed but a warning is logged as the range is invalid:

```
 WARN  invalid version range for dependency "foo":

- null injected by generator "my-plugin"
```
2020-02-27 11:10:14 +08:00
Haoqun Jiang f5f4de0aa3 feat(GeneratorAPI): allow passing options to api.extendPackage (#5149)
Currently, 3 options are implemented:

- options.prune (defaults to `false`) - Remove null or undefined
fields from the object after merging.
- options.merge (defaults to `true`) deep-merge nested fields, note
that dependency fields are always deep merged regardless of this option.
- options.warnIncompatibleVersions (defaults to `true`) Output warning
if two dependency version ranges don't intersect.

Closes #4779
2020-02-06 14:28:00 +08:00
Pavan Kumar Sunkara 1c269d22f5 fix: extendPackage object values should be string (#5038) 2020-01-13 21:22:21 +08:00
Haoqun Jiang b7f83b45ce fix: support parser option for codemods, and enable ts parsing by default (#4883)
fixes #4861
2019-11-26 15:52:50 +08:00
Haoqun Jiang b6825756e9 test: fix failing tests that due to async support in Generator 2019-07-29 16:56:04 +08:00
阿平 74f629ea3f feat(cli): Generator support async (#3897) 2019-07-29 16:55:42 +08:00
Pavan Kumar Sunkara 544faee81e feat: more flexible hook system for generators (#2337) 2019-07-21 19:59:18 +08:00
Haoqun Jiang 5460ca498f feat: add transformScript to GeneratorAPI (#4188) 2019-06-26 18:25:47 +08:00
Haoqun Jiang af25ef75ce feat: make injectImports & injectRootOptions work for .vue files (#4168)
closes #1702
2019-06-21 17:20:53 +08:00
Haoqun Jiang 2e417b01d2 refactor: replace recast with jscodeshift for injectImportsAndOptions (#4003)
fixes #3309
2019-05-17 14:58:31 +08:00
Haoqun Jiang 15b5c8d4d7 chore!: change default value of lintOnSave option (#3975)
BREAKING CHANGE:
See https://github.com/vuejs/vue-cli/pull/3572
2019-05-14 11:20:20 +08:00
Steve Workman f69339e816 feat: add makeJSOnlyValue to generator API (#3568)
Provides convenience method for passing JS into config files.
Closes issue #3535.
2019-04-09 19:54:17 +08:00
Dobromir Hristov 3f434f69c6 fix(plugin api): fix generator dotfile rename for Windows. (#2427)
close #2424
2018-09-04 17:49:17 +08:00
Evan You 8dfa2907a7 refactor: generate postcss.config.js instead of .postcssrc.js 2018-08-15 18:34:55 -04:00
Evan You 1892bcc251 fix(generator): handle directories starting with dot
close #2222
2018-08-15 18:34:55 -04:00
Stephen Lam e393be733d feat(generator): allow plugins to modify how configs are extracted (#1130)
* feat(generator): allow plugins to modify how configs are extracted

* refactor(cli): change addConfigTransform parameters

Allow plugin author to set config 'descriptions' instead of implementing their own transform functions.

* fix(cli): fix missed issues from changing types from array to set

* fix: use reserved config transforms to check in API

* fix: lines dedupe
2018-07-11 19:52:57 +02:00
Pavan Kumar Sunkara 8eb7fc3a97 fix: Don't allow duplicate injections of import statements and root options by plugins (#1774)
* feat(cli): Don't allow duplicate api.injectImports

* feat(cli): Don't allow duplicate api.injectRootOptions

* chore(cli): Added tests for duplicate injections
2018-07-11 14:05:29 +02:00
Thorsten Lünborg 7b3812e248 feat: Create .browserslistrc file when user chose "separate config files" (#1773)
* feat(cli): When selecting "separate config files",
cli should create .browserslistrc file

close #1236

* test(cli): add test for extracting .browserslistrc
2018-07-05 23:11:01 +02:00
Evan You 7fd5f255e0 test: fix test for windows 2018-05-22 10:28:41 -04:00
Evan You 8b32f4a60f feat: GeneratorAPI: addImports & addRootOptions 2018-05-21 14:25:49 -04:00
Evan You be8d31710a test: fix stringifyJS import 2018-05-18 22:50:05 -04:00
Evan You 07ac887486 fix: stringifyJS should be used in all call sites 2018-05-18 18:49:58 -04:00
test 2de86cea70 test: fix generator tests after babel config change 2018-05-17 17:19:39 -04:00
Evan You 0f73a91162 refactor: use fs-extra 2018-04-30 18:19:02 -04:00
Derek Henscheid 0f76b8e4b4 feat(plugin-api): allow non-semver versioned dependencies (#1184)
close #1177
2018-04-27 17:54:54 -04:00
Evan You 9cfafea328 refactor(cli): default to .js for eslintrc and postcssrc
close #994
2018-04-27 12:45:45 -04:00
Derek Henscheid 6af7bbe247 fix: deep merge objects when extending package.json via plugins (#1070)
close #1053
2018-04-25 17:53:06 -04:00
Evan You 5ae22a1ad4 refactor: allow Generator to accept inline files 2018-03-05 12:07:08 -05:00
Evan You f065d18aec test: tests for template inehritance 2018-03-03 18:47:26 -05:00
Evan You 46166fb640 fix: handle vue invoke config merging for existing files
close #788
2018-02-06 16:02:09 -05:00
Evan You f372f55e93 feat: allow saving multiple presets 2018-01-28 00:24:33 -05:00
Evan You 01edb46b8c feat: support config in dedicated files 2018-01-27 17:03:31 -05:00
Evan You 95fd052349 move tests around 2018-01-07 19:01:54 -05:00