FredKSchott/snowpack

Getting Started guide needed: Django + Snowpack

Open

#3389 opened on May 29, 2021

View on GitHub
 (3 comments) (8 reactions) (0 assignees)JavaScript (19,541 stars) (923 forks)batch import
contributors welcome!documentationgood first issue

Description

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 of packageOptions.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.

Contributor guide