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

URL scheme "file" is not supported. #10

Open
goors opened this issue Sep 3, 2021 · 3 comments
Open

URL scheme "file" is not supported. #10

goors opened this issue Sep 3, 2021 · 3 comments

Comments

@goors
Copy link

goors commented Sep 3, 2021

Geting URL scheme "file" is not supported. when trying to upload file. I know that in fact is Browser limitation for fetch.
One other thing, how can i use this without minified version of cimdraw?

@danielePala
Copy link
Owner

Yes, as you say this is related to how browsers handle the "file" scheme and I don't see a workaround, I suggest you use a local web server instead.
About the second question, right now in package.json there is only one build script which minifies the code, probably it would be good to define another script (like "build-dev" or similar) which doesn't perform minification.

@goors
Copy link
Author

goors commented Sep 7, 2021

Thanks for the update.

What about using this without minification? What is the order of files that I have to import to index.html from js dir?
So project can run either like that or on some port like http://localhost:3000 or similar?

@danielePala
Copy link
Owner

Supposing you will compile the riot tags under js/tmp, a possible import sequence should be like this:

    <script src="js/D3/d3.min.js"></script>
    <script src="js/bootstrap/bootstrap.bundle.min.js"></script>
    <script src="js/d3-context-menu/d3-context-menu.js"></script>
    <script src="js/riot/riot.min.js"></script>
    <script src="js/riot/route.standalone.js"></script>
    <script src="js/riot/observable.js"></script>
    <script src="js/fflate/fflate.min.js"></script>
    <script src="js/tmp/cimTopologyProcessor.js"></script>
    <script src="js/tmp/cimDiagramControls.js"></script>
    <script src="js/tmp/cimDiagram.js"></script>
    <script src="js/tmp/cimTree.js"></script>
    <script src="js/tmp/cimDraw.js"></script>
    <script src="js/schema.js"></script>
    <script src="js/model.js"></script>
    <script src="js/topology.js"></script>
    <script src="js/matpower.js"></script>
    <script src="js/diagramUtils.js"></script>

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

No branches or pull requests

2 participants