Skip to content

Adapters - Guide Docs #51

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

Merged
merged 10 commits into from
Dec 18, 2018
Merged

Adapters - Guide Docs #51

merged 10 commits into from
Dec 18, 2018

Conversation

pietrop
Copy link
Contributor

@pietrop pietrop commented Dec 14, 2018

Following up from #38 added some guides in the docs for how to create new adapters.

At draft stage, feedback welcome.

especially on

  • structure of the guide
  • clarity of the explanation
  • steps of the giuide
  • refactor*

*refactor: as in should we re-factor the code (perhaps at a later stage) to make the adapter creation process even more straightforward?

Pietro Passarelli - News Labs added 3 commits December 14, 2018 15:08
added some details on how to create new adapters, with explanation of draftJs, block, entityRanges, and entityMap
@pietrop pietrop added Documentation Enhancement a request for improvement and removed Enhancement a request for improvement labels Dec 14, 2018
],
"start": 13.02
},
"entityRanges": [ // <-- entity ranges
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think you really need this + line 34 as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this? as in the custom data? or the example code?

@jamesdools
Copy link
Contributor

Also 😱

are those gigantic json files necessary?

@pietrop
Copy link
Contributor Author

pietrop commented Dec 14, 2018

Also 😱

are those gigantic json files necessary?

lol, yeah no, I mean they are for the tests, altho they could be made smaller. I had made a note that we should see if we can exclude them from the bundle so that they are not shipped with the packaged component.

for example in package.json we have:

"build:component": "rimraf dist && NODE_ENV=production babel src/lib --out-dir dist --copy-files --ignore __tests__, spec.js, test.js ,__snapshots__",

so there might be a way to add them to the ignore list. eg adding a naming convention like some name+.sample.json?

@pietrop
Copy link
Contributor Author

pietrop commented Dec 18, 2018

I've excluded sample files adding .sample.js and .sample.json file extension

otherwise would set to latest 11 which doesn't seem to work with npm
@pietrop
Copy link
Contributor Author

pietrop commented Dec 18, 2018

merging as a first draft

@pietrop pietrop merged commit 8b0b875 into master Dec 18, 2018
@pietrop pietrop deleted the adapters branch December 18, 2018 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants