Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contents
generate
layouts
partials
LICENSE.md
README.md
esp.json
expansive.json
pak.json

README.md

esp-angular-skeleton

Pak for esp-angular-skeleton

Description

The esp-angular-skeleton is a starter skeleton for ESP using AngularJS. It provides a default layout, partial pages, Less stylesheets and is configured to use Expansive for rendering and tooling to process less stylesheets and minify scripts.

The skeleton is configured for a "debug" and "release" mode of operation via the "mode" property in package.json. By default, debug mode will disable minification and mangling of scripts.

The skeleton includes templates for ESP to generate controllers, scaffolds and database migrations.

Provides

  • contents/css — Application less stylesheets
  • contents/index.esp — Default home page
  • contents/main.js — Primary application script
  • esp.json — ESP configuration file
  • expansive.json — Expansive configuration file
  • layouts/default.html.exp — Master web page layout
  • paks/ — Installed packages
  • partials/ — Web page partial content

Dependencies

The esp-angular-skeleton package depends upon:

Installation

pak install esp-angular-skeleton

Building

expansive render

Running

expansive

or

expansive render
esp

Configuration

esp.json

  • esp.generate — Template files to use when using esp generate.
  • http.formats.date — Default date format.
  • http.formats.float — Default numerical format for floating point numbers.
  • http.routes — Set the route set to use 'esp-restful'
{
    "esp": {
        "generate": {
            "appweb": "esp-angular-skeleton/generate/appweb.conf",
            "clientModel": "esp-angular-skeleton/generate/model.js",
            "clientController": "esp-angular-skeleton/generate/controller.js",
            "clientList": "esp-angular-skeleton/generate/list.html",
            "clientEdit": "esp-angular-skeleton/generate/edit.html",
            "controller": "esp-angular-skeleton/generate/controller.c",
            "controllerSingleton": "esp-angular-skeleton/generate/controllerSingleton.c"
        }
    },
    "http": {
        "formats": {
            "response": "json",
            "date": "yyyy-MM-dd",
            "float": 2
        },
        "routes": "esp-restful"
    }
}

expansive.json

  • less.enable — Enable the less service to process less files.
  • less.dependencies — Explicit map of dependencies if not using "stylesheet".
  • less.files — Array of less files to compile.
  • less.stylesheet — Primary stylesheet to update if any less file changes. If specified, the "dependencies" map will be automatically created.
  • ng-compile-js.files — Array of Angular Javasccript files to compile.
  • ng-compile-html.enable — Compile Angular HTML files into pure Javascript.
  • css.enable — Enable minifying CSS files.
  • js.compress — Enable compression of script files.
  • js.dotmin — Set '.min.js' as the output file extension after minification. Otherwise will be '.js'.
  • js.enable — Enable minifying script files.
  • js.files — Array of files to minify. Files are relative to 'contents'.
  • js.mangle — Enable mangling of Javascript variable and function names.
{
    services: {
        'css': {
            enable: true,
        },
        'less': {
            enable: true,
            stylesheet: 'css/all.css',
            dependencies: { 'css/all.css.less' : '**.less' },
            documents: [ '!**.less', '**.css.less' ]
        },
        'js': {
            enable: true,
            files:      null,
            compress:   true,
            mangle:     true,
            dotmin:     false,
        },
        'ng-compile-js': {
            files: [
                '**.js',
                '!lib/**.js',
                'lib/angular*/**.js',
                'lib/esp*/**.js'
            ]
        },
        'ng-package':   false
    }
}

Get Pak from

https://www.embedthis.com/pak

You can’t perform that action at this time.