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

feat: add user defined parsers #256

Merged
merged 22 commits into from
Jul 21, 2020
Merged

feat: add user defined parsers #256

merged 22 commits into from
Jul 21, 2020

Conversation

mathe42
Copy link
Contributor

@mathe42 mathe42 commented Jul 12, 2020

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Add option to add UserDefined parsers:

{
   content: {
     extendParser: {
        '.myfile': file => parse(file)
     }
   }
}

fixes #104

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

benjamincanac and others added 9 commits July 10, 2020 15:49
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
* fix(lib): use compound sort

* fix(lib): plugin sends sorts in wrong order

* test: add with multiple sorts
Co-authored-by: Renovate Bot <bot@renovateapp.com>
* docs: update github link to dev branch

* Properly handle anchor tags without href fields (#230)

* chore(deps): update dependency @nuxt/static to ^0.0.12 (#234)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update devdependency sass-loader to ^9.0.2 (#235)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix: use compound sort (#238)

* fix(lib): use compound sort

* fix(lib): plugin sends sorts in wrong order

* test: add with multiple sorts

* chore(deps): update dependency @nuxt/static to v1 (#242)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore: add content:ready hook (#243)

* translate configuration.md into japanese

* add playground.md in ja

* add integrations.md in ja

* add examples.md in ja

* edit fetching.md

* translate wriging.md in ja

* update theme.md front matter in ja

* translate advanced.md in ja

* fix a bit

* edit front matter

* add translation

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
Co-authored-by: Philip E Blair <peblairman@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
@mathe42 mathe42 mentioned this pull request Jul 12, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2020

Codecov Report

❗ No coverage uploaded for pull request base (dev@ab1cc21). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             dev     #256   +/-   ##
======================================
  Coverage       ?   90.19%           
======================================
  Files          ?       15           
  Lines          ?      551           
  Branches       ?      118           
======================================
  Hits           ?      497           
  Misses         ?       48           
  Partials       ?        6           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab1cc21...47aceaa. Read the comment docs.

@benjamincanac benjamincanac linked an issue Jul 13, 2020 that may be closed by this pull request
@mathe42
Copy link
Contributor Author

mathe42 commented Jul 14, 2020

@benjamincanac added docs. Can you help me with tests?

@Atinux
Copy link
Member

Atinux commented Jul 15, 2020

Thank you for the PR, I think we should rename userParser to extendParser instead.

@mathe42
Copy link
Contributor Author

mathe42 commented Jul 16, 2020

@Atinux Done.

Build fails in macos for no reason (while yarn connection is lost.) A rerun should fix that.

@Atinux
Copy link
Member

Atinux commented Jul 16, 2020

Awesome :)

On thing left is to add a test with a custom parser!

@mathe42
Copy link
Contributor Author

mathe42 commented Jul 16, 2020

Yes. But I need help with this... Don't know where to start...

@Atinux
Copy link
Member

Atinux commented Jul 20, 2020

@benjamincanac can you help him on the tests onboarding?

@benjamincanac
Copy link
Member

Hey @mathe42, I've just pushed a test in test/options.test.js, I guess this should be enough, what do you think @Atinux?

@mathe42
Copy link
Contributor Author

mathe42 commented Jul 20, 2020

Looks good to me.

@benjamincanac benjamincanac merged commit 3a3dc23 into nuxt:dev Jul 21, 2020
@cogor cogor mentioned this pull request Jul 22, 2020
2 tasks
benjamincanac added a commit that referenced this pull request Jul 27, 2020
* docs: update github link to dev branch

* Properly handle anchor tags without href fields (#230)

* chore(deps): update dependency @nuxt/static to ^0.0.12 (#234)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update devdependency sass-loader to ^9.0.2 (#235)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix: use compound sort (#238)

* fix(lib): use compound sort

* fix(lib): plugin sends sorts in wrong order

* test: add with multiple sorts

* chore(deps): update dependency @nuxt/static to v1 (#242)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore: add content:ready hook (#243)

* docs: Update Japanese translate (#245)

* docs: update github link to dev branch

* Properly handle anchor tags without href fields (#230)

* chore(deps): update dependency @nuxt/static to ^0.0.12 (#234)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update devdependency sass-loader to ^9.0.2 (#235)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix: use compound sort (#238)

* fix(lib): use compound sort

* fix(lib): plugin sends sorts in wrong order

* test: add with multiple sorts

* chore(deps): update dependency @nuxt/static to v1 (#242)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore: add content:ready hook (#243)

* translate configuration.md into japanese

* add playground.md in ja

* add integrations.md in ja

* add examples.md in ja

* edit fetching.md

* translate wriging.md in ja

* update theme.md front matter in ja

* translate advanced.md in ja

* fix a bit

* edit front matter

* add translation

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
Co-authored-by: Philip E Blair <peblairman@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>

* add user defined parsers

* fix empty options

* add to default config

* add docs

* Update nuxt.config.js

* Create custom.custom

* Update nuxt.config.js

* Update index.md

* Update configuration.md

* Update nuxt.config.js

* Update utils.js

* Update database.js

* test: add options with extend parser

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
Co-authored-by: Philip E Blair <peblairman@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: 森 優太 mori <59682979+uta-mori@users.noreply.github.com>
@mathe42 mathe42 deleted the patch-4 branch August 2, 2020 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parser plugin interface
6 participants