Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Make core editor component a library #60

Closed
2 tasks
harunurhan opened this issue Aug 12, 2016 · 7 comments
Closed
2 tasks

Make core editor component a library #60

harunurhan opened this issue Aug 12, 2016 · 7 comments

Comments

@harunurhan
Copy link
Collaborator

harunurhan commented Aug 12, 2016

  • Organize folder structure so that core generic editor can be published as a npm module to be used in angular2 apps.
  • Webpack should only build core editor component for production

So components in app folder other than editor such as app, editor-container should be used for development, should only have inspire specific logic, also should be an example usage for others who want to use it.

@harunurhan
Copy link
Collaborator Author

microsoft/TypeScript#8372 might be related.

@harunurhan
Copy link
Collaborator Author

Work flow to prepare an angular2 module for publishing, is

  • Build d.ts, js, js.map files from ts source files using tsc.
  • Copy html and css files into output folder of tsc

Our problem is that we use scss, we should probably switch using css or use grunt-like tool to compile scss files to css then copy them into the output folder.

@kaplun @jmartinm

@kaplun
Copy link
Contributor

kaplun commented Aug 23, 2016

I am not the best to give advices on JS :) But I think we should favor scss (etc.) over css. I think introducing grunt is perfectly normal. How would you automatize also the tsc part?

@kaplun
Copy link
Contributor

kaplun commented Aug 23, 2016

cc: @drjova since this is also related to generally deploying the module.

@harunurhan
Copy link
Collaborator Author

For tsc part, it is possible to trigger it with either grunt or npm scripts such as prepublish

Btw, I see that you're using gulp for other projects, so probably that should be the one that I use?

@drjova
Copy link
Contributor

drjova commented Aug 23, 2016

In general we use gulp already, but for angular2 we can use webpack it has better integration for babel etc.

We build and move the files on release https://github.com/inveniosoftware/invenio-records-js/blob/master/.travis.yml#L55-L68

For the docs we are updating the gh-pages after its release https://github.com/inveniosoftware/invenio-records-js/blob/master/deploy.sh#L30-L48

👍 for scss it will be better for future usage i.e. bs4

:)

@harunurhan
Copy link
Collaborator Author

@drjova Since we will not bundle the core editor component for npm release, do you think it still makes sense to use webpack?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants