Skip to content

Commit

Permalink
Improve installation documentation text (cibernox#1818)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelinz committed May 29, 2024
1 parent faddc39 commit 3aec368
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions docs/app/templates/public-pages/docs/installation.hbs
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
<h1 class="doc-page-title">Installation</h1>

<p>
Ember-power-select is distributed as an <a href="http://www.ember-cli.com/" target="_blank" rel="noopener noreferrer">Ember-cli</a> addon,
so the major part of installation will be done by following command on your ember project directory
Ember Power Select is distributed as an <a href="http://www.ember-cli.com/" target="_blank" rel="noopener noreferrer">Ember CLI</a> addon,
so the majority of the installation will be done by running the following command in your Ember project directory:
</p>

<div class="highlight">
<pre class="language-command"><code class="language-command">$ ember install ember-power-select</code></pre>
</div>

<p>
When installing this through <code>ember install</code> the addon will add the necessary snippet above
automatically in your app.
When installing via <code>ember install</code>, the addon will automatically add the necessary snippets to your app.
</p>

<p>
The addon is using internal ember-concurrency. ember-concurrency needs some manual steps. For this steps see <a href="http://ember-concurrency.com/docs/installation" target="_blank" rel="noopener noreferrer">ember-concurrency</a> -> <i>"Configure Babel Transform"</i> on installation page.
The addon uses ember-concurrency internally, which require some manual steps for installation. For these steps, see the <a href="http://ember-concurrency.com/docs/installation" target="_blank" rel="noopener noreferrer">ember-concurrency</a> installation page under <i>"Configure Babel Transform"</i>.
</p>

<h2 class="t3">Manual installation</h2>
<h2 class="t3">Manual Installation</h2>

<p>
If you don't have used <code>ember install</code> you need to add <code>ember-basic-dropdown</code> and <code>ember-concurrency</code> as <code>devDependencies</code> in <code>package.json</code>.
If you haven't used <code>ember install</code>, you need to add <code>ember-basic-dropdown</code> and <code>ember-concurrency</code> as <code>devDependencies</code> in your <code>package.json</code>.
</p>

<p>
After the installation you need to add the following lines somewhere in your templates where you want to render the power select content into e.g. your <code>application.hbs</code>.
In this component will be rendered the power select content.
After installation, add the following line to the templates where you want to render the power select content, such as in your <code>application.hbs</code>.
This component will render the power select content.
</p>

<CodeBlock @language="hbs" @code="<BasicDropdownWormhole />" />

<p>
If you use vanilla CSS, you need to add the following line into <code>app.js</code> or in any route/controller/component <code>.js/.ts</code> file:
If you use vanilla CSS, add the following line to your <code>app.js</code> or any route/controller/component <code>.js/.ts</code> file:
</p>

<CodeBlock @language="js" @code="import 'ember-power-select/styles';" />

<p>
Instead of adding the styling in an <code>.js</code> file and depending from your build config you can also add the css in any template/component css file by using following line
Instead of adding the styling in a <code>.js</code> file.
Depending on your build config you can also add the CSS in any template/component CSS file using the following line:
</p>

{{!-- template-lint-disable no-potential-path-strings --}}
<CodeBlock @language="css" @code="@import 'ember-power-select/vendor/ember-power-select.css';" />

<p>
However, if you are using SASS or LESS you need to add an import statement to your styles.
If you are using SASS or LESS, you need to add an import statement to your styles.
</p>

{{#let (get-code-snippet "installation-1.scss") as |snippet|}}
<CodeBlock @language="scss" @code={{snippet.source}} />
{{/let}}

<p>
If you are using LESS there is also necessary to register the <code>paths</code> in <code>lessOptions</code>
For LESS, you also need to register the <code>paths</code> in <code>lessOptions</code>.
</p>

{{#let (get-code-snippet "installation-2.js") as |snippet|}}
<CodeBlock @language="js" @code={{snippet.source}} />
{{/let}}

<p>
This explicit import is needed because using css preprocessors like SASS and LESS allows you to
customize the appearance of ember-power-select using variables. This is easier and generates less
This explicit import is needed because using CSS preprocessors like SASS and LESS allows you to
customize the appearance of ember-power-select using variables. This method is easier and generates less
code than overriding styles you don't like.
</p>

<p>
More information about style in <LinkTo @route="public-pages.docs.styles">Basic customization: Styles</LinkTo>
For more information about styling, see <LinkTo @route="public-pages.docs.styles">Basic Customization: Styles</LinkTo>.
</p>

<p>
The addon is using internal ember-concurrency. For installation see <a href="http://ember-concurrency.com/docs/installation" target="_blank" rel="noopener noreferrer">ember-concurrency</a> installation page.
For further details on ember-concurrency installation, visit the <a href="http://ember-concurrency.com/docs/installation" target="_blank" rel="noopener noreferrer">ember-concurrency</a> installation page.
</p>

<div class="doc-page-nav">
Expand Down

0 comments on commit 3aec368

Please sign in to comment.