GithubHelp home page GithubHelp logo

Local dev environment about svelte-gantt HOT 6 CLOSED

anovokmet avatar anovokmet commented on July 23, 2024
Local dev environment

from svelte-gantt.

Comments (6)

ANovokmet avatar ANovokmet commented on July 23, 2024 1

Sorry for the outdated docs. For development using the demo it is best to run two scripts: npm run autobuild to build svelte-gantt and npm run demo:dev to build and serve the demo at localhost:5000

from svelte-gantt.

ManadayM avatar ManadayM commented on July 23, 2024

Thank you for your reply @ANovokmet. I'm still unable to make it run due to the missing global variable names warning/error. In the browser console, it throws svelteRouting is not defined error. Am I missing something?

I also noticed that if I remove demo:autobuild from this script "demo:dev": "run-p demo:start demo:autobuild" then I can run the demo project at localhost:5000 but I'm sure that is an outdated build as index.js there doesn't have svelteRouting and svelteGantt IIFE args.

from svelte-gantt.

ANovokmet avatar ANovokmet commented on July 23, 2024

Did you try running npm install in demo/ directory?

from svelte-gantt.

ManadayM avatar ManadayM commented on July 23, 2024

Yes, I did that. I received a compiler.js related error after that and to fix that I found I should rollup-plugin-svelte to at least version 6.1.1. I did that as well. Now, I see further warnings and errors in the terminal but am also able to run the demo project locally.

This is how my terminal output looks like.

Screenshot 2021-12-07 at 3 07 32 PM

Below are the setup steps I have performed to run this project locally (with some warnings).

  1. npm install in the root directory.
  2. npm run build in the root directory. This will generate the build artifacts in the dist directory.
  3. npm install inside demo directory.
  4. npm i [email protected] inside demo directory to upgrade the plugin version to fix the compiler.js related error.
  5. npm run autobuild from the root.
  6. npm run demo:dev from the root.

Please let me know if these steps are correct or not. I've fairly limited experience with both Svelte and Rollup as of now. I hope to improve at both of them and contribute back.

Once again thank you for your help @ANovokmet.

from svelte-gantt.

ANovokmet avatar ANovokmet commented on July 23, 2024

Cloned into a new folder to test.
I did everything the same as you but except 2. which I didn't do, and as 4. I used npm i -D rollup-plugin-svelte@latest which fixed the error. And I'm getting no errors there. And then the demo is served at http://localhost:5000/svelte-gantt/. With no Reference errors in the console.

from svelte-gantt.

ManadayM avatar ManadayM commented on July 23, 2024

Installing the latest rollup plugin for Svelte fixed the remaining issues. Now, I am able to run the demo project. Thank you for your great help. 🙏🏼

from svelte-gantt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.