-
Notifications
You must be signed in to change notification settings - Fork 35
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
improve documentation #19
Comments
can you please explain in detail what has to be added in README.md file exactly? |
@ampsteric Sure! Most of the content in the issue description can be added directly. But if you want you can add some other details as well if you find something missing. For example here is an example of a project with an excellent README. https://github.com/code-monk08/connect4. You can add some contribution guidelines, a gallery section which contains screenshots of the website, credits/acknowledgement section for the contributors and other stuff like that. |
okay. I would love to do that. can you please assign it to me? |
Done @ampsteric. AFAIK if you want your PRs to be counted in Hacktoberfest you have to create them after 1st Oct so you can send it after that. |
@humancalico okay. |
okay. will surely do that. |
@humancalico can you please mention what do you want under the guidelines section? |
@ampsteric Nothing really, the How to contribute section in the README is fine imo. |
Okay. Thanks for the clarification. |
resolved the #19 issue. best regards, |
Content to be added in
README.md
most of it is directly taken from the sapper starter template:Index
Running the project
However you get the code, you can install dependencies and run the project in development mode with:
Open up localhost:3000 and start clicking around.
Consult sapper.svelte.dev for help getting started.
Structure
Sapper expects to find two directories in the root of your project —
src
andstatic
.src
The src directory contains the entry points for your app —
client.js
,server.js
and (optionally) aservice-worker.js
— along with atemplate.html
file and aroutes
directory.src/routes
This is the heart of your Sapper app. There are two kinds of routes — pages, and server routes.
Pages are Svelte components written in
.svelte
files. When a user first visits the application, they will be served a server-rendered version of the route in question, plus some JavaScript that 'hydrates' the page and initialises a client-side router. From that point forward, navigating to other pages is handled entirely on the client for a fast, app-like feel. (Sapper will preload and cache the code for these subsequent pages, so that navigation is instantaneous.)Server routes are modules written in
.js
files, that export functions corresponding to HTTP methods. Each function receives Expressrequest
andresponse
objects as arguments, plus anext
function. This is useful for creating a JSON API, for example.There are three simple rules for naming the files that define your routes:
src/routes/about.svelte
corresponds to the/about
route. A file calledsrc/routes/blog/[slug].svelte
corresponds to the/blog/:slug
route, in which caseparams.slug
is available to the routesrc/routes/index.svelte
(orsrc/routes/index.js
) corresponds to the root of your app.src/routes/about/index.svelte
is treated the same assrc/routes/about.svelte
.src/routes/_helpers/datetime.js
and it would not create a/_helpers/datetime
routestatic
The static directory contains any static assets that should be available. These are served using sirv.
In your service-worker.js file, you can import these as
files
from the generated manifest......so that you can cache them (though you can choose not to, for example if you don't want to cache very large files).
Production mode and deployment
To start a production version of your app, run
npm run build && npm start
. This will disable live reloading, and activate the appropriate bundler plugins.The text was updated successfully, but these errors were encountered: