From 4f3506407a91f00bd6c307544d3b5bfa73ee0595 Mon Sep 17 00:00:00 2001 From: Chasen Le Hara Date: Thu, 7 Sep 2017 10:56:09 -0700 Subject: [PATCH] Add plugins configuration documentation Fixes https://github.com/stealjs/stealjs/issues/34 --- docs/pages/configuration.md | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/pages/configuration.md b/docs/pages/configuration.md index d4ae412b9..8a4bb6a03 100644 --- a/docs/pages/configuration.md +++ b/docs/pages/configuration.md @@ -12,13 +12,16 @@ A basic configuration might look like this: ... "steal": { "meta": { - "jquery-plugin": { + "jquery-plugin": { "deps": ["jquery"] } - }, - "paths": { + }, + "paths": { "some-dep": "lib/some/dep.js" - } + }, + "plugins": [ + "steal-css" + ] } } ``` @@ -71,6 +74,32 @@ import foo from "foo"; Will get the `FOO` global. +## Plugins + +Plugins (such as [steal-css](https://www.npmjs.com/package/steal-css)) should be installed as `devDependencies` and added to the `plugins` configuration in your `package.json`. + +For example, to use `steal-css`, first install it with npm: + +``` +npm install steal-css --save-dev +``` + +Then update the `plugins` configuration in your `package.json`: + +```json +{ + ... + "devDependencies": { + ... + "steal-css": "^1.0.0" + }, + "steal": { + ... + "plugins": ["steal-css"] + } +} +``` + ## Progressively loaded bundles In the [steal-tools.guides.progressive_loading progressive loading guide] we show how to progressively load different pages within your app. You import these modules using the [steal.import] function like so: