GithubHelp home page GithubHelp logo

ptzagk / create-svelte-site Goto Github PK

View Code? Open in Web Editor NEW

This project forked from just214/create-svelte-site

0.0 0.0 0.0 102 KB

Create a Svelte or Sapper site in a single command.

JavaScript 7.84% Batchfile 0.79% TypeScript 91.36%

create-svelte-site's Introduction

Create Svelte Site oclif Version Downloads/week License

Create a Svelte or Sapper site in a single command.

create-svelte-site gif

Usage

Creating a Site

You’ll need to have Node 8.10.0 or later on your local development machine (but it’s not required on the server). You can use nvm (macOS/Linux) or nvm-windows to easily switch Node versions between different projects.

With npx

  npx create-svelte-site my-site

With npm

  npm init svelte-site my-site

With yarn

  yarn create svelte-site my-site

Note: We are using my-site as an example. This can be any project name you choose.

You will be prompted to select a template from the official Svelte template library.

create-svelte-site prompt

After you make your selection, your new site will be created in a directory named my-site inside the current folder.

Next steps:

Navigate to the newly created directory.

cd my-site

Install the dependencies

npm install

or

yarn

Then, start up the development server.

npm run dev

Your site will be available at http://localhost:5000.

Note: npm run dev does not apply to the Svelte (component) project type.

Commands

Here is a full list of the options and the corresponding templates that are executed.

Under the hood, this library is using nodegit to generate your new project using official Svelte and community templates.

Command Template
Svelte (rollup) svelte/template
Svelte (webpack) svelte/template-webpack
Svelte (component) svelte/component-template
Svelte (custom element) gojutin/svelte-custom-element
Sapper (rollup) sveltejs/sapper-template#rollup
Sapper (webpack) sveltejs/sapper-template#webpack

Useful Resources

create-svelte-site's People

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.