Dashboard Hero
  • Scope
  • Introduction
    • Meet and greet
    • Requirements(tech)
    • Requirements(user)
  • Setting up
    • Developing locally
    • Deploying
  • Basics
    • Scss
    • Javascript
    • Svelte framework
    • vs React vs Angular vs vue.js
    • Rollup(and rollup.config.js)
    • NPM(and package.json)
  • Project structure
    • Overview
    • Git version
    • Folder version
  • Architecture
    • DRY vs WET programming
    • Basic
    • Extended
  • Components
    • Component lifecycle
    • Passing data between components
    • Buttons
    • Charts
    • Grids
    • Search bars
    • Other inputs
    • Dialogs
    • Dropdowns
    • Gauges
    • User management pages
  • Backend
    • Firebase cloud functions
  • Data sources
    • Firebase
    • MongoDB
    • *SQL sources
    • GraphQL
  • User management
    • Log in
    • Register
    • Forgot pass
    • Custom flows
    • Others
  • State control
    • Redux
    • MobX
    • Saga
  • Dashboard: a full project
    • Overview
    • Layout
    • Routing
    • Removing/adding pages
    • Deploying
  • Roadmap/tutorial
    • Introduction - building your own app
    • 1. UI - HTML&CSS
    • 2. Data sources(+testing)
    • 3. Defining and using existing components
    • 4. User management
    • 5. Go live!
  • Troubleshooting
    • Can't run the project
Powered by GitBook
On this page

Was this helpful?

  1. Project structure

Overview

PreviousNPM(and package.json)NextGit version

Last updated 5 years ago

Was this helpful?

Let's have a quick look at the project scaffold. We'll have a look at even more details in the Architecture section.

/public - output of packaged app

/src - this is what you will be using during development. NPM calls rollup, and together they move and transform the files from /src to /public.

Rollup - a tool that compiles small pieces of code into something larger. In a nutshell, it scans src/(that might contain import and require statements, for instance) and produces /public(parts of it, anyway) that the browser can understand and interpret.

package.json - manifest file for your project(kind of). Lists details of your project(names), main entry point in the app(main.js), and external dependencies(think maven/ivy for Java world, composer for php, PyPM for Python). See for more details.

rollup.config.js - configuration for Rollup. input - This is a required setup and it represents the file we want rollup to process. It should be the main entry point of the application where we import everything else required by it. output - marks the folder where the results gets copied. Since we're just talking about the scaffold, we'll leave it at this, for now. See for more details.

NPM(and package.json)
Rollup(and rollup.config.js)