[Paraview] Using ParaviewWeb examples
Sebastien Jourdain
sebastien.jourdain at kitware.com
Tue Feb 20 13:00:43 EST 2018
Hi Tom,
So everything is up, so you can checkout the website.
Regarding your loader, I think it is good. You can look the ones we use
here:
https://github.com/Kitware/paraviewweb/tree/master/config
And for the dependency, we let the user to add every dependency required
instead of forcing a specific version in our pvw dependency list. That way
they can update or pick version at their own discretion.
Especially if a dependency is missing the error message is pretty explicit
regarding which one needs to be added.
Seb
On Tue, Feb 20, 2018 at 10:44 AM, Sgouros, Thomas <thomas_sgouros at brown.edu>
wrote:
> Cool, thank you. I found some additional dependencies (hammerjs and
> monologue.js) and added this loader to the webpack config for the
> font-awesome thing:
>
> {
> test: /\.(eot|svg|ttf|woff|woff2)$/,
> loader: 'file-loader?name=public/fonts/[name].[ext]'
> }
>
> Not sure if that's optimal, but it seems to work. My package dependencies
> look like this now:
>
> "dependencies": {
> "font-awesome": "^4.7.0",
> "kw-web-suite": "^5.0.0",
> "monologue.js": "^0.3.5",
> "normalize.css": "^8.0.0",
> "paraviewweb": "^3.0.9",
> "react": "^15.5.4",
> "react-dom": "^15.5.4",
> "wslink": "^0.1.5",
> "hammerjs": "^2.0.8"
> },
>
> Happy to hear if I've gotten something wrong. Looking forward to the new
> site.
>
> Thank you,
>
> -Tom
>
> On Tue, Feb 20, 2018 at 12:32 PM, Sebastien Jourdain <
> sebastien.jourdain at kitware.com> wrote:
>
>> Hi Tom,
>>
>> I've just updated ParaViewWeb documentation (setup) to reflect the latest
>> tools that we use.
>> Also I've updated the examples to use absolute path so you would not need
>> to figure out those relative path resolution.
>>
>> Travis is currently building the new version along with an updated
>> website which usually take around 25 minutes to complete.
>>
>> Seb
>>
>> On Tue, Feb 20, 2018 at 8:16 AM, Sgouros, Thomas <
>> thomas_sgouros at brown.edu> wrote:
>>
>>> Yes, my excursion to webpack 1 was enough of a failure that I'm not
>>> tempted.
>>>
>>> Thank you for that, I'll see if I can get something out of those.
>>>
>>> -Tom
>>>
>>> On Tue, Feb 20, 2018 at 9:54 AM, Sebastien Jourdain <
>>> sebastien.jourdain at kitware.com> wrote:
>>>
>>>> Hi Tom,
>>>>
>>>> Try to stay with the latest webpack. The setup doc was initially
>>>> describing the ParaViewWeb config itself.
>>>> But since we've updated the build process of ParaViewWeb, you could
>>>> look at the actual configuration of ParaViewWeb itself. That will give you
>>>> the proper set of files.
>>>>
>>>> https://github.com/Kitware/paraviewweb/blob/master/webpack.config.js
>>>> https://github.com/Kitware/paraviewweb/blob/master/prettier.config.js
>>>> https://github.com/Kitware/paraviewweb/blob/master/package.json
>>>> https://github.com/Kitware/paraviewweb/blob/master/.eslintrc.js
>>>> https://github.com/Kitware/paraviewweb/blob/master/.babelrc
>>>>
>>>> Hope that helps until we fix and update the documentation,
>>>>
>>>> Seb
>>>>
>>>> On Mon, Feb 19, 2018 at 4:34 PM, Sgouros, Thomas <
>>>> thomas_sgouros at brown.edu> wrote:
>>>>
>>>>> Hi Sebastien:
>>>>>
>>>>> I suspected that and also tried downgrading to webpack 1, but then
>>>>> loading paraviewweb won't work because lots of its dependencies require
>>>>> webpack versions up to 2.2.0. (babel-loader, expose-loader, schema-utils,
>>>>> worker-loader, several others) It tells you to load the peer dependencies
>>>>> by hand, but that seems not to work for paraviewweb, though I'm probably
>>>>> misunderstanding something.
>>>>>
>>>>> I will forget the examples and try building up a webpack from scratch,
>>>>> but there are a few things in the webpack config that make me nervous about
>>>>> the prospects:
>>>>>
>>>>> 1. The alias PVWStyle.
>>>>>
>>>>> 2. The "postcss: [require('autoprefixer')... ]
>>>>>
>>>>> 3. 'loader: "expose?MyWebApp"'.
>>>>>
>>>>> All of these seem like maybe they are going to be required for some
>>>>> parts of paraviewweb. The current version of webpack seems to choke on them
>>>>> all, and I won't know what to replace them with. Any advice?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> -Tom
>>>>>
>>>>> On Mon, Feb 19, 2018 at 6:16 PM, Sebastien Jourdain <
>>>>> sebastien.jourdain at kitware.com> wrote:
>>>>>
>>>>>> Hi Tom,
>>>>>>
>>>>>> The documentation was written when we were still using Webpack 1 and
>>>>>> unfortunately it is outdated.
>>>>>> I'll try to update it so it will be easier to follow for users that
>>>>>> don't know any of those web tools.
>>>>>>
>>>>>> For normalize, you can find some information directly on their web
>>>>>> site https://necolas.github.io/normalize.css/
>>>>>>
>>>>>> Seb
>>>>>>
>>>>>> On Mon, Feb 19, 2018 at 2:27 PM, Sgouros, Thomas <
>>>>>> thomas_sgouros at brown.edu> wrote:
>>>>>>
>>>>>>> I tried that page twice and get errors about missing fix-autobahn,
>>>>>>> and when I removed that from the package.json, webpack complained about
>>>>>>> missing eslint (I installed eslint, but it doesn't change), and then errors
>>>>>>> saying "Webpack has been initialised using a configuration object that does
>>>>>>> not match the API schema" and errors about the output directory needing to
>>>>>>> be an "**absolute path** (required)". I'm sure there's something simple I'm
>>>>>>> missing, but not sure what.
>>>>>>>
>>>>>>> Thank you,
>>>>>>>
>>>>>>> -Tom
>>>>>>>
>>>>>>> On Mon, Feb 19, 2018 at 4:08 PM, Aron Helser <
>>>>>>> aron.helser at kitware.com> wrote:
>>>>>>>
>>>>>>>> I think you're looking for the setup doc: https://kitware.github.io
>>>>>>>> /paraviewweb/docs/setup.html
>>>>>>>> It gives you a sample webpack config. Nearly all the paraviewweb
>>>>>>>> dependencies are contained in kw-websuite, as documented on that page.
>>>>>>>>
>>>>>>>> The examples as they stand use a bit of magic, you are right, so
>>>>>>>> they can be embedded in the documentation pages. AFAIK, we don't have an
>>>>>>>> install option to make a stand-alone example.
>>>>>>>> Regards,
>>>>>>>> Aron
>>>>>>>>
>>>>>>>> On Mon, Feb 19, 2018 at 3:59 PM, Sgouros, Thomas <
>>>>>>>> thomas_sgouros at brown.edu> wrote:
>>>>>>>>
>>>>>>>>> Thank you. it would be great also to have pointers to
>>>>>>>>> normalize.css, and the webpack and package configs for these examples. They
>>>>>>>>> are more like puzzles than examples in their current state, with the
>>>>>>>>> challenge to find all the missing pieces and guess how to put them
>>>>>>>>> together. Am I missing some intro that steps me through those parts? Or is
>>>>>>>>> there a way to see the whole example laid out with those other pieces?
>>>>>>>>> Maybe an npm install option that will give me these examples on my disk?
>>>>>>>>>
>>>>>>>>> I see fragments of examples on this page: https://kitware.github.i
>>>>>>>>> o/paraviewweb/docs/import.html , but apparently it is not enough
>>>>>>>>> for me.
>>>>>>>>>
>>>>>>>>> Thank you,
>>>>>>>>>
>>>>>>>>> -Tom
>>>>>>>>>
>>>>>>>>> On Mon, Feb 19, 2018 at 2:48 PM, Aron Helser <
>>>>>>>>> aron.helser at kitware.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Tom,
>>>>>>>>>> The ParaviewWeb examples always live in a sub-directory of the
>>>>>>>>>> component they illustrate - so here, this is the Composite example, so '..'
>>>>>>>>>> just refers to 'Composite'.
>>>>>>>>>> If you look in the left menu, you can see that 'Composite' is
>>>>>>>>>> grouped into ' Component/Native'. That's the directory it's in. '../../BackgroundColor'
>>>>>>>>>> is a sibling directory to 'Composite', so it will also be in '
>>>>>>>>>> Component/Native'
>>>>>>>>>>
>>>>>>>>>> Generally you can follow the '..' out from the example
>>>>>>>>>> sub-directory and figure out where you are.
>>>>>>>>>>
>>>>>>>>>> Hope that helps,
>>>>>>>>>> Aron
>>>>>>>>>>
>>>>>>>>>> On Mon, Feb 19, 2018 at 2:38 PM, Sgouros, Thomas <
>>>>>>>>>> thomas_sgouros at brown.edu> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hello all:
>>>>>>>>>>>
>>>>>>>>>>> When I see a Paraviewweb example like this (from Composite.html):
>>>>>>>>>>>
>>>>>>>>>>> import CompositeComponent from '..';
>>>>>>>>>>> import BGColorComponent from '../../BackgroundColor';
>>>>>>>>>>>
>>>>>>>>>>> Where should I look for BackgroundColor and CompositeComponent?
>>>>>>>>>>> I feel sure I could find them eventually, but is there another search
>>>>>>>>>>> algorithm besides brute force?
>>>>>>>>>>>
>>>>>>>>>>> Thank you,
>>>>>>>>>>>
>>>>>>>>>>> -Tom
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Powered by www.kitware.com
>>>>>>>>>>>
>>>>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>>>>
>>>>>>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>>>>>>> http://paraview.org/Wiki/ParaView
>>>>>>>>>>>
>>>>>>>>>>> Search the list archives at: http://markmail.org/search/?q=
>>>>>>>>>>> ParaView
>>>>>>>>>>>
>>>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>>>> https://public.kitware.com/mailman/listinfo/paraview
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by www.kitware.com
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>
>>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>>> http://paraview.org/Wiki/ParaView
>>>>>>>
>>>>>>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> https://public.kitware.com/mailman/listinfo/paraview
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180220/b2cc5643/attachment.html>
More information about the ParaView
mailing list