Open nerdoc opened 3 years ago
Love to see issues like this. We’re all about making things more accessible for beginners, and we agree you shouldn’t need any “secret knowledge” to get started. This shouldn’t assume something you haven’t read.
We do have several guides in our docs as well as some really clear Tutorials like React, Svelte, and Vue. But we don’t currently have a Django guide, or any other backend guides for that matter. I do think that in your scenario, we’re really not trying to leave you in the dust. But we’re just not Django users ourselves and we just honestly don’t know how Snowpack works in a Django-friendly way. And we’d love an expert’s help in making that happen!
If it’s all right, I’m going to change the title of this issue to “Django guide needed” because I believe that’s what you’re asking for.
Sure, thanks.
any progress on this? I would love to use snowpack in Django projects
The problem that you want to solve. The docs ("get started") assume that you are familiar with webpack or another packager and know what exactly snowpack is supposed to do. From a beginners perspective, I have no clue how to use snowpack the way I want.
It may sound to you like "OMG, learn Javascript first." - but that's not the problem. It's that the snowpack docs assume that you are deply familiar with bundling systems like webpack. Which is not the case, at least in my case.
Example: I use a Django setup with some Js libraries, which I import from the templates directly, without a Js bundler. As the project gets more complex and Js files are spread over Django apps, I'll try to find a more convenient way to aggregate assets. There are some ways using webpack, beginning with django/webpack where you need a webpack plugin and a django plugin, and other tutorials without like this here without plugins. But for Django (or another framework, or without framework), there is not really a beginner friendly concise, step-by-step tutorial how to create a snowpack environment. I am struggling since days/weeks to get it up and running. Concretely, using my Django setup/problem: There is a
plugins/**/javascript
folder in any Django app that I want to be included in the build. The documentation ofpackageOptions.knownEntrypoints
is not telling me enough on how to achieve this.mount
doesn't neither, I can't see any glob usage explanation etc.Your take on the correct solution to problem. I suppose that snowpack finds Js files (and others, using plugins?) and moves them into a "build" folder, trans-/compiled or not. I tried to start with a simple snowpack template project, but putting that in a django context, I can't see how to use it
This may be a fairly complexer setup, but the only feature I request is , that you add some lines to your docs, on how basically snowpack works, what it does, from a beginner's view.
Are you willing to submit a pull request to implement this change? Sure. Maybe If someone explains me a bit more, I could try to find words for someone who starts, like me, with snowpack, ynd try a PR for the docs.