Getting Started


Installation

The theme includes a custom Webpack file, which can be used to quickly recompile and minify theme assets while developing or for deployment. You'll need to install Node.js before using Webpack.

Once Node.js is installed, run npm install to install the rest of AppStack's dependencies. All dependencies will be downloaded to the node_modules directory.

npm install

Now you're ready to modify the source files and generate new dist/ files. AppStack is using webpack and webpack-serve to automatically detect file changes and start a local webserver at http://localhost:8080.

npm start

Build tools

Start a local webserver at http://localhost:8080 and detect file changes:

npm start

Automatically detect file changes without starting a local webserver:

npm run watch

Compile, optimize, minify and uglify all source files to dist/:

npm run build

File structure

Inside the zip-file you'll find the following directories and files. Both compiled and minified distrubution files, as well as the source files are included in the package.

  • πŸ“ docs - HTML demo files
  • πŸ“ dist - Compiled files
    • πŸ“ css
    • πŸ“ js
    • πŸ“ img
    • πŸ“ fonts
  • πŸ“ src - Source files
    • πŸ“ scss
      • πŸ“ 1-variables - Sass variables
      • πŸ“ 2-mixins - Sass mixins
      • πŸ“ 3-components - AppStack's components
      • πŸ“ 4-utilities - Utilities/helpers
      • πŸ“ 5-vendor - 3rd party plugin styling
      • πŸ“„ _app.scss
      • πŸ“„ dark.scss
      • πŸ“„ light.scss
    • πŸ“ js
      • πŸ“ modules
      • πŸ“„ app.js
    • πŸ“ img
    • πŸ“ fonts
  • πŸ“„ .babelrc - Babel configuration file
  • πŸ“„ .eslintrc - ESLint configuration file
  • πŸ“„ .gitignore - Specifies files to ignore
  • πŸ“„ package.json - List of dependencies and available scripts
  • πŸ“„ webpack.config.js - Webpack configuration file

Basic template

This basic template can be used as a guideline for how to structure new pages while using AppStack. Some meta tags and our CSS & JS files are included inside the template.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">

  <title>AppStack</title>

  <link href="{PATH}/dist/css/light.css" rel="stylesheet">
</head>
<body data-theme="default" data-layout="fluid" data-sidebar-position="left" data-sidebar-behavior="sticky">
  <h1>Hello, world!</h1>

  <script src="{PATH}/dist/js/app.js"></script>
</body>
</html>