Code Monkey home page Code Monkey logo

donutstore's Introduction

DonutStore

An Angular app that uses the DonutAPI to show and teach about building Jamstack apps in with Angular.

Step1

In this branch we will install Scully to this project.

Run the following to add Scully to this project:

ng add @scullyio/init

At this point, read the changelog in the terminal to see what was changed about your app.

Noteworthy changes:

  • app.module - Imported the ScullyLibModule.
  • polyfils.ts - Updated to add some zone.js functionality.
  • sculy.DonutStore.config.js - Your new scully config file has been created.

How to Verify

Great! So we have installed Scully, but now what do we do? Well, we need to verify that it successfully installed Scully and that our project is able to be pre-rendered with Scully. To do this, run the following steps from your terminal:

  • ng build - You need to run a build. Scully requires it prior to pre-rendering.
  • npm run scully - Now run Scully!

When that runs, notice that it generates our /about and / routes. But it shows you a warning about your route /donuts/:donutId. In the next step we will address that warning.

But you can now check the contents of your /dist/static directory and see that your /index.html /about/index.html pages were both pre-rendered to HTML and CSS.

Also notice that the scully build created a scully-routes.json file with a list of all the routes in your app. This file will come in handy later.

Now what?

To move on, stash your changes and checkout the step2 branch.

git stash //hides your changes you just made
git checkout step2

donutstore's People

Contributors

aaronfrost avatar

Watchers

 avatar

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.