Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package typesafe
    Definition Classes
    com
  • package sbt
    Definition Classes
    typesafe
  • package web
    Definition Classes
    sbt
  • package incremental

    The incremental task API lets tasks run more quickly when they are called more than once.

    The incremental task API lets tasks run more quickly when they are called more than once. The idea is to do less work when tasks are called a second time, by skipping any work that has already been done. In other words, tasks only perform the “incremental” work that is necessary since they were last run.

    To analyse which work needs to be done, a task’s work is broken up into a number of sub-operations, each of which can be run independently. Each operation takes input parameters and can read and write files. The incremental task API keeps a record of which operations have been run so that that those operations don’t need to be repeated in the future.

    Here is how tasks interact with the API:

    - Tasks call the API with a list of potential operations to perform and with a function to run operations.

    - The API takes care of pruning the list of operations to find the incremental operations that need to be run.

    - The API then calls the supplied function to run the pruned list of operations. This method returns a list of results, one for each operation.

    - If an operation succeeds, the details are recorded so that the operation can be skipped in the future, if possible.

    Behind the scenes, syncIncremental maintains a record of each operation that succeeds. It uses these records to work out which operations need to be run and which can be skipped.

    Each operation is assumed to take some input parameters, optionally read and write some files, and either succeed or fail when it runs. An operation which fails will always be run again even if its parameters and input files remain the same. But an operation which succeeds will only need to be run again if its input parameters change or if the contents of any files it read from or wrote to have changed.

    Definition Classes
    web
  • package js
    Definition Classes
    web
  • package pipeline
    Definition Classes
    web
  • CompileProblems
  • CompileProblemsException
  • GeneralProblem
  • Import
  • LineBasedProblem
  • LinePosition
  • SbtWeb

object SbtWeb extends AutoPlugin

Adds settings concerning themselves with web things to SBT. Here is the directory structure supported by this plugin showing relevant sbt settings:

+ src
--+ main
----+ assets .....(sourceDirectory in Assets)
------+ js
----+ public .....(resourceDirectory in Assets)
------+ css
------+ images
------+ js
--+ test
----+ assets .....(sourceDirectory in TestAssets)
------+ js
----+ public .....(resourceDirectory in TestAssets)
------+ css
------+ images
------+ js

+ target
--+ web
----+ public
------+ main
--------+ css
--------+ images
--------+ js
------+ test
--------+ css
--------+ images
--------+ js
----+ stage

The plugin introduces the notion of "assets" to sbt. Assets are public resources that are intended for client-side consumption e.g. by a browser. This is also distinct from sbt's existing notion of "resources" as project resources are generally not made public by a web server. The name "assets" heralds from Rails.

"public" denotes a type of asset that does not require processing i.e. these resources are static in nature.

In sbt, asset source files are considered the source for plugins that process them. When they are processed any resultant files become public. For example a coffeescript plugin would use files from "unmanagedSources in Assets" and produce them to "public in Assets".

All assets be them subject to processing or static in nature, will be copied to the public destinations.

How files are organised within "assets" or "public" is subject to the taste of the developer, their team and conventions at large.

The "stage" directory is product of processing the asset pipeline and results in files prepared for deployment to a web server.

Linear Supertypes
AutoPlugin, PluginsFunctions, Basic, Plugins, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SbtWeb
  2. AutoPlugin
  3. PluginsFunctions
  4. Basic
  5. Plugins
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def &&(o: Basic): Plugins
    Definition Classes
    Basic → Plugins
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def allRequirements: PluginTrigger
    Definition Classes
    PluginsFunctions
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val autoImport: Import.type
  8. def buildSettings: Seq[sbt.Def.Setting[_]]
    Definition Classes
    SbtWeb → AutoPlugin
  9. def classpathWithoutAssets(classpath: Classpath): Classpath

    Remove web module dependencies from a classpath.

    Remove web module dependencies from a classpath. This is a helper method for Play 2.3 transitions.

  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. def copyResourceTo(to: sbt.File, url: sbt.URL, cacheDir: sbt.File): sbt.File

    Copy a resource to a target folder.

    Copy a resource to a target folder.

    The resource won't be copied if the new file is older.

    to

    the target folder.

    url

    the url of the resource.

    cacheDir

    the dir to cache whether the file was read or not.

    returns

    the copied file.

  12. def createWebJarMappings: sbt.Def.Initialize[Task[Seq[(sbt.File, String)]]]

    Create package mappings for assets in the webjar format.

    Create package mappings for assets in the webjar format. Use the webjars path prefix and exclude all web module assets.

  13. def deduplicateMappings(mappings: Seq[PathMapping], deduplicators: Seq[Deduplicator]): Seq[PathMapping]

    Deduplicate mappings with a sequence of deduplicator functions.

    Deduplicate mappings with a sequence of deduplicator functions.

    A mapping has duplicates if multiple files map to the same relative path. The deduplicators are applied to the duplicate files and the first successful deduplication is used (when a deduplicator selects a file), otherwise the duplicate mappings are left and an error will be reported when syncing the mappings.

    mappings

    the mappings to deduplicate

    deduplicators

    the deduplicating functions

    returns

    the (possibly) deduplicated mappings

  14. def derivedProjects(proj: ProjectDefinition[_]): Seq[Project]
    Definition Classes
    AutoPlugin
  15. def empty: Plugins
    Definition Classes
    PluginsFunctions
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  18. def exportAssets(assetConf: sbt.Configuration, exportConf: sbt.Configuration, track: sbt.TrackLevel): sbt.Def.Initialize[Task[Classpath]]
  19. def extraProjects: Seq[Project]
    Definition Classes
    AutoPlugin
  20. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def flattenDirectWebModules: sbt.Def.Initialize[Task[Seq[(File, String)]]]
  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def getInternalWebModules(conf: sbt.Configuration): sbt.Def.Initialize[Task[Seq[String]]]

    Get module names for all internal web module dependencies on the classpath.

  24. def globalSettings: Seq[sbt.Def.Setting[_]]
    Definition Classes
    AutoPlugin
  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. val label: String
    Definition Classes
    AutoPlugin
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def noTrigger: PluginTrigger
    Definition Classes
    PluginsFunctions
  30. val nodeModulesSettings: Seq[sbt.Def.Setting[_ >: Seq[File] with Seq[Task[Seq[File]]] with Task[Seq[File]] with File <: AnyRef]]
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def packageAssetsMappings: sbt.Def.Initialize[Task[Seq[(File, String)]]]

    Create package mappings for all assets, adding the optional prefix.

  34. def packageSettings: Seq[sbt.Setting[_]]
  35. def path(normalized: String, separator: Char = java.io.File.separatorChar): String

    Transform normalized paths into platform-specific paths.

  36. def projectConfigurations: Seq[Configuration]
    Definition Classes
    SbtWeb → AutoPlugin
  37. def projectSettings: Seq[sbt.Setting[_]]
    Definition Classes
    SbtWeb → AutoPlugin
  38. def requires: JvmPlugin.type
    Definition Classes
    SbtWeb → AutoPlugin
  39. def selectFileFrom(base: sbt.File): Deduplicator

    Deduplicator that selects the first file contained in the base directory.

    Deduplicator that selects the first file contained in the base directory.

    base

    the base directory to check against

    returns

    a deduplicator function that prefers files in the base directory

  40. def selectFirstDirectory: Deduplicator

    Deduplicator that checks whether all duplicates are directories and if so will simply select the first one.

    Deduplicator that checks whether all duplicates are directories and if so will simply select the first one.

    returns

    a deduplicator function for duplicate directories

  41. def selectFirstIdenticalFile: Deduplicator

    Deduplicator that checks that all duplicates have the same contents hash and if so will simply select the first one.

    Deduplicator that checks that all duplicates have the same contents hash and if so will simply select the first one.

    returns

    a deduplicator function for checking identical contents

  42. def syncExportedAssets(track: sbt.TrackLevel): sbt.Def.Initialize[Task[sbt.File]]
  43. def syncMappings(cacheStore: CacheStore, mappings: Seq[PathMapping], target: sbt.File): sbt.File

    Efficiently synchronize a sequence of mappings with a target folder.

    Efficiently synchronize a sequence of mappings with a target folder.

    cacheStore

    the cache store.

    mappings

    the mappings to sync.

    target

    the destination directory to sync to.

    returns

    the target value

  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    AutoPlugin → AnyRef → Any
  46. def trigger: PluginTrigger
    Definition Classes
    AutoPlugin
  47. val unscopedAssetSettings: Seq[sbt.Setting[_]]
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  51. def webJarsPathPrefix: sbt.Def.Initialize[Task[String]]

Inherited from AutoPlugin

Inherited from PluginsFunctions

Inherited from Basic

Inherited from Plugins

Inherited from AnyRef

Inherited from Any

Ungrouped