Skip to content

1.5.0

Compare
Choose a tag to compare
@matthewp matthewp released this 24 Apr 14:17
· 467 commits to master since this release

This is a minor release of steal that adds the new homeAlias option and a new build of steal.js that excludes the promises polyfill.

Features

homeAlias

Steal 1.0 added the tilde operator that allows you to reference your project's root/home folder using the ~ scheme like so:

import "~/components/tabs";

The ~ character was chosen because it correlates nicely to the concept of home directories in the filesystem. However since some ecosystems have this same idea but use another character (for example, in the Vue community using @/ is common) the homeAlias config option was added so that you can change what character is used to indicate the home folder.

{
  "steal": {
    "homeAlias": "@"
  }
}
import "@/components/tabs";

The ~ scheme is the default homeAlias, so no configuration is needed to use that.

steal-sans-promises

Now that it is 2017 more and more browsers support Promise native. For many projects there is no need to use a polyfill.

In Steal 2.0 it is likely that no polyfill will be included (or might be included optionally), but in the meantime the steal-sans-promises.js and steal-sans-promises.production.js scripts have been added to steal.

Use them in exactly the same manner that you use steal.js today:

<script src="./node_modules/steal/steal-sans-promises.js"></script>

Note that when building with steal-tools the steal.production.js script is copied into your dest folder. This is the normal version of steal which does include the Promise polyfill. There is an open issue to provide a way to use steal-sans-promises.production.js instead (and ditto for using bundleSteal). In the meantime you can use steal-sans-promises from node_modules like so:

<script src="./node_modules/steal/steal-sans-promises.production.js" main="app/main"></script>

Issues