Skip to content

Commit ecabac8

Browse files
authored
Merge pull request #1 from ember-learn/master
bringing changes from base repo
2 parents 9549fa6 + 4fb09d7 commit ecabac8

29 files changed

+5591
-1830
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
indent_style = space
14+
indent_size = 2
15+
16+
[*.md]
17+
trim_trailing_whitespace = false

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
language: node_js
3+
node_js:
4+
- 6
5+
6+
sudo: false
7+
dist: trusty
8+
9+
cache:
10+
directories:
11+
- $HOME/.npm
12+
13+
before_install:
14+
- npm config set spin false
15+
16+
script:
17+
- npm run lint:md
18+
- npm test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You will need the following things properly installed on your computer.
2525
To see what a local copy of the Guides markdown looks like:
2626

2727
* Clone the [Ember CLI Guides](https://github.com/ember-learn/cli-guides-app) App repository
28-
* link the `ember-cli-guides-source` repository by running `npm link` inside this repository, then `npm link @ember-learn/cli-guides` in the guides-app
28+
* link the `cli-guides-source` repository by running `npm link` inside this repository, then `npm link @ember-learn/cli-guides` in the guides-app
2929
* `npm install` and `ember serve` in the guides app
3030
* Visit your app at [http://localhost:4200](http://localhost:4200).
3131
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

guides/advanced-use/asset-pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Cover very very basic Broccoli info. Link to Oli's tutorials. See the Ember Times Readers questions for a great writeup of what broccoli is -->
1+
<!-- Cover very very basic Broccoli info. Link to Oli's tutorials. See the Ember Times Readers questions for a great writeup of what broccoli is -->

guides/advanced-use/blueprints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- cover what blueprints are and how to modify them. Can be ported from the existing site -->
1+
<!-- cover what blueprints are and how to modify them. Can be ported from the existing site -->

guides/advanced-use/configurations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Should cover at least minification and fingerprinting -->
1+
<!-- Should cover at least minification and fingerprinting -->

guides/advanced-use/file-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- A place to talk about the resolver (see ember-cli.com), module imports, and eventually, Module Unification when it becomes a thing -->
1+
<!-- A place to talk about the resolver (see ember-cli.com), module imports, and eventually, Module Unification when it becomes a thing -->

guides/advanced-use/stylesheets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Should cover similar topics as ember-cli.com -->
1+
<!-- Should cover similar topics as ember-cli.com -->

guides/api-documentation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The API docs for Ember CLI are mainly for addon authors, advanced Ember app deve
44

55
The docs are the main resource for information like build pipeline modifications, addon author APIs, advanced configurations, and more.
66

7-
The API documentation is built from the code comments in the main CLI codebase, [ember-cli on GitHub](https://github.com/ember-cli/ember-cli). If you spot an issue in the documentation, please open an issue or pull request on that repository.
7+
The API documentation is built from the code comments in the main CLI codebase, [ember-cli on GitHub](https://github.com/ember-cli/ember-cli). If you spot an issue in the documentation, please open an issue or pull request on that repository.

guides/basic-use/configurations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- The bare minimum explanation of what to do with ember-cli-build.js -->
1+
<!-- The bare minimum explanation of what to do with ember-cli-build.js -->

guides/basic-use/deploying.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- should show ember build, link to ember-cli-deploy, Guides tutorial -->
1+
<!-- should show ember build, link to ember-cli-deploy, Guides tutorial -->

guides/basic-use/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ If Watchman is not installed, a notice is displayed when invoking various comman
3434

3535
### Installing for Windows
3636

37-
<!-- copy over from ember-cli.com -->
37+
Windows Vista and newer Windows versions are fully supported, although there are steps you can take to improve your experience.
38+
You can find more information about this in our section on [Windows support](../reference/windows/)
3839

3940
## Getting help
4041

guides/basic-use/upgrading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ ember --version
2121
## Upgrading an Ember app itself
2222

2323
There are automated Ember CLI tools available to help upgrade Ember apps, including codemods that help with syntax changes. Visit
24-
[ember-cli-update](https://github.com/ember-cli/ember-cli-update for the latest instructions.
24+
[ember-cli-update](https://github.com/ember-cli/ember-cli-update) for the latest instructions.
2525

2626
<!-- Needs a section that describes a common upgrade experience, explains deprecations, links to Deprecations site, and hints that upgrades to get new features or jump major versions require changes to the codebase. Common misconception is that you can just jump versions in package.json. Pull in info from https://ember-cli.com/user-guide/#upgrading -->
2727

2828
## Upgrading Addon Dependencies
2929

30-
<!-- very brief guidance on how to approach addons, and a note that sometimes deprecation warnings come from outdated addons rather than your app -->
30+
<!-- very brief guidance on how to approach addons, and a note that sometimes deprecation warnings come from outdated addons rather than your app -->

guides/basic-use/using-addons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ Here are just a few examples of popular community-maintained addons unique to Em
3838
- [liquid-fire](https://www.emberobserver.com/addons/liquid-fire), for animating things like route transitions to provide a smooth, native-app-like experience.
3939
- and so many more!
4040

41-
Open Source projects like these addons rely on community members helping out. Some addons are sponsored by companies, but many are maintained on 100% volunteer time. If something doesn't work the way you expect, could be better documented, has a bug, or could be added as a new feature, please speak up and pitch in!
41+
Open Source projects like these addons rely on community members helping out. Some addons are sponsored by companies, but many are maintained on 100% volunteer time. If something doesn't work the way you expect, could be better documented, has a bug, or could be added as a new feature, please speak up and pitch in!
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<!--Help Wanted-->
2-
<!--should cover ember-auto-import, importing from node modules, etc-->
2+
<!--should cover ember-auto-import, importing from node modules, etc-->

guides/reference/common-issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- copy over from ember-cli.com -->
1+
<!-- copy over from ember-cli.com -->

guides/reference/dev-tools.md

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,148 @@
1-
<!-- Copy over code editor content -->
1+
<!-- Copy over code editor content -->
2+
3+
### Visual Studio Code
4+
If you are using [VSCode](https://code.visualstudio.com/) with `ember-cli`, there's an [official
5+
extension pack](https://marketplace.visualstudio.com/items?itemName=emberjs.emberjs#overview)
6+
maintained by the Ember Learning team that adds multiple ember plugins that can help in
7+
Ember development. If you already have VSCode installed on your machine, you can
8+
[click here](vscode:extension/emberjs.emberjs) to view this extension pack inside VSCode. Alternatively, you can
9+
also search for `emberjs.emberjs` inside the [extensions view](https://code.visualstudio.com/docs/editor/extension-gallery).
10+
11+
### Atom
12+
13+
If you are using [Atom](https://atom.io) with `ember-cli`, there are some
14+
packages available specific to Ember development.
15+
16+
`Atom -> Preferences -> Install`
17+
18+
* [ember-cli-helper](https://atom.io/packages/ember-cli-helper) - ember-cli integration in Atom
19+
* [ember-tabs](https://atom.io/packages/ember-tabs) - Makes atom.io work better with Ember pods
20+
* [atom-ember-components](https://atom.io/packages/atom-ember-components) - See all controllers and components that are rendering your component. Currently only works with pods structure.
21+
22+
### Emacs
23+
24+
If you are using [Emacs](https://www.gnu.org/software/emacs/) with `ember-cli`,
25+
Emacs creates temporary backup, autosave, and lockfiles that interfere with
26+
broccoli watcher, so they need to either be moved out of the way or disabled.
27+
To do that, ensure your emacs configuration contains the following:
28+
29+
```bash
30+
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
31+
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
32+
(setq create-lockfiles nil)
33+
```
34+
35+
An [ember-mode](https://github.com/madnificent/ember-mode) package is also
36+
available. It has shortcuts for quickly navigating files in ember projects,
37+
running generators, and running build, serve, and test tasks. It also includes
38+
support for linking build errors to files and minibuffer notifications of
39+
`ember serve` status. It can be installed from [MELPA](http://melpa.org/). To
40+
use MELPA, ensure your configuration contains the following:
41+
42+
```bash
43+
(require 'package)
44+
(add-to-list 'package-archives
45+
'("melpa" . "http://melpa.org/packages/") t)
46+
(package-initialize)
47+
```
48+
49+
Then ember-mode can be installed from the package menu at `M-x
50+
package-list-packages`. After it is installed, add a file named
51+
`.dir-locals.el` to the root of your ember projects with the contents:
52+
53+
```bash
54+
((nil . ((mode . ember))))
55+
```
56+
57+
to enable it inside those projects.
58+
59+
60+
### Sublime Text
61+
62+
If you are using [Sublime Text](http://www.sublimetext.com) with `ember-cli`,
63+
by default it will try to index all files in your `tmp` directory for its
64+
GoToAnything functionality. This will cause your computer to come to a
65+
screeching halt @ 90%+ CPU usage, and can significantly increase build times.
66+
Simply remove these directories from the folders Sublime Text watches:
67+
68+
`Sublime Text -> Preferences -> Settings - User`
69+
70+
```js
71+
// folder_exclude_patterns and file_exclude_patterns control which files
72+
// are listed in folders on the side bar. These can also be set on a per-
73+
// project basis.
74+
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "tmp/class-*", "tmp/es_*", "tmp/jshinter*", "tmp/replace_*", "tmp/static_compiler*", "tmp/template_compiler*", "tmp/tree_merger*", "tmp/coffee_script*", "tmp/concat-tmp*", "tmp/export_tree*", "tmp/sass_compiler*"]
75+
```
76+
77+
### WebStorm
78+
If you are using [WebStorm](https://www.jetbrains.com/webstorm/) with
79+
`ember-cli`, you will need to modify your `.gitignore` file, enable
80+
`ECMAScript6` settings, and mark certain directories.
81+
82+
First, add the following line to `.gitignore`:
83+
```bash
84+
.idea
85+
```
86+
87+
Next, from the WebStorm menu:
88+
89+
`File > Settings -> Languages & Frameworks -> JavaScript -> ECMAScript6`
90+
91+
Click 'OK' to close the Settings modal window.
92+
93+
Next, in Webstorm's Project window right-click on each of the following
94+
directories, go to 'Mark Directory As' and mark as indicated:
95+
96+
Mark as `Excluded`:
97+
```bash
98+
/tmp
99+
/dist
100+
```
101+
102+
Mark as `Resource Root`:
103+
```bash
104+
/
105+
/bower_components
106+
/bower_components/ember-qunit/lib
107+
/public
108+
```
109+
110+
Mark as `Test Sources Root`:
111+
```bash
112+
/tests
113+
```
114+
115+
### Intellij-emberjs
116+
117+
[This plugin](https://github.com/Turbo87/intellij-emberjs) provides excellent
118+
Ember.js support for all JetBrains IDEs that support JavaScript, including
119+
WebStorm.
120+
121+
In order to install it, go to:
122+
123+
`File | Settings... | Plugins | Browse repositories...`
124+
125+
Search for `Ember.js` and click the Install button.
126+
127+
### Vim
128+
129+
If you are using [Vim](http://www.vim.org/) with `ember-cli`, Vim creates
130+
temporary backups and autosaves which interfere with broccoli, so they need to
131+
either be moved out of the way or disabled. To do that, ensure your .vimrc
132+
contains the following:
133+
134+
```bash
135+
set backupdir=~/.vim/backup//
136+
set directory=~/.vim/swap//
137+
set undodir=~/.vim/undo//
138+
```
139+
140+
And make sure to create the directories:
141+
```bash
142+
mkdir -p ~/.vim/backup; mkdir -p ~/.vim/swap; mkdir -p ~/.vim/undo
143+
```
144+
145+
Some useful Vim plugins for working with Ember.js:
146+
147+
- [ember_tools](https://github.com/AndrewRadev/ember_tools.vim) - Provides various tools for navigation and code reformatting, similar to rails.vim for Rails.
148+
- [projectionist](https://github.com/tpope/vim-projectionist) - Powerful project navigation, provided you write your own code projections. Here's [an example](https://gist.github.com/AndrewRadev/3524ee46bca8ab349329)

guides/reference/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Do I need to use the CLI, why broccoli instead of webpack, node version compatibility? -->
1+
<!-- Do I need to use the CLI, why broccoli instead of webpack, node version compatibility? -->

guides/reference/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Brief description of what goes in the reference section. Mostly edge case stuff -->
1+
<!-- Brief description of what goes in the reference section. Mostly edge case stuff -->

guides/reference/windows.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,83 @@
1-
<!-- Port over info from existing site -->
1+
Windows Vista and newer Windows versions are fully supported.
2+
3+
To get started ensure the following dependencies are installed:
4+
5+
* Node.js - [https://nodejs.org/en/](https://nodejs.org/en/)
6+
* Git - [https://git-scm.com/](https://git-scm.com/)
7+
* Chrome - [https://www.google.com/chrome/](https://www.google.com/chrome/)
8+
9+
### Performance
10+
11+
Although supported, Windows performance, at least by default, isn't as good as
12+
on Linux or MacOS. On a positive note, this story continues to improve. Both
13+
Microsoft, and the Ember CLI team continue to work on improving these developer
14+
ergonomics.
15+
16+
#### What causes the build slowdown?
17+
18+
The two primary reasons are:
19+
20+
* Lack of enabled-by-default symlinks
21+
* Generally slower FS operations on NTFS
22+
23+
#### For the best possible Windows experience
24+
25+
* Use Windows Subsystem Linux [Installation
26+
Guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)
27+
28+
#### Improving your Windows experience
29+
30+
Ensure Search and Defender ignore your project's `tmp` directory:
31+
32+
```bash
33+
npm install -g ember-cli-windows
34+
```
35+
36+
Then, to start the automatic configuration, run:
37+
38+
```bash
39+
ember-cli-windows
40+
```
41+
42+
*Make sure you use an elevated PowerShell.* <!-- Needs Instructions -->
43+
If there was an error, try executing Set-ExecutionPolicy Unrestricted -scope Process first.
44+
45+
[Read more about this from the Microsoft DX Open Source team](http://felixrieseberg.com/improved-ember-cli-performance-with-windows/)
46+
47+
### Enabling symlinks
48+
49+
To create symlinks the account running Ember CLI must have the
50+
`SeCreateSymbolicLinkPrivilege`. Users in the Administrators group have this
51+
permission already. However, if UAC (User Access Control) is enabled, users in
52+
the Administrators group must run their shell using Run As Administrator
53+
because UAC strips away certain permissions from the Administrators +group,
54+
including `SeCreateSymbolicLinkPrivilege`.
55+
56+
![Run As Administrator]({{ site.url }}/assets/images/common-issues/run-as-admin.png)
57+
58+
If the user account is not part of the Administrators group you will need to
59+
add the `SeCreateSymbolicLinkPrivilege` to allow the creation of symlinks. To
60+
do this open the `Local Security Policy` by typing Local Security Policy in the
61+
Windows `Run` Box.
62+
63+
Under `Local Policies` -> `User Rights Assignment` find the `Create symbolic
64+
links` policy and double click it to add a new user or group. Once your user or
65+
group has been added, your user should be able to create symlinks. Keep in mind
66+
if your user is part of the Administrators group and UAC is enabled you will
67+
still need to start your shell using `Run as Administrator`.
68+
69+
![Enabling Symlinks]({{ site.url }}/assets/images/common-issues/enabling-symlinks.png)
70+
71+
### Issues With npm: `EEXISTS`, Path too Long, etc
72+
73+
There were always two major issues with running Node.js on Windows: first and
74+
foremost, the operating system maintains a maximum length for path names, which
75+
clashes with Node's traditional way of nesting modules in `node_modules`. The
76+
second issue was a bit more subtle: The npm installer had a set of steps it
77+
executed for each package and it would immediately start executing them as soon
78+
as it decided to act on a package resulting in hard-to-debug race conditions.
79+
80+
`npm` 3 is a nearly complete rewrite of `npm`, fixing both issues. Windows users of
81+
Ember Cli might want to make the switch to `npm` 3 to benefit from its
82+
flat module installation (solving most issues involving long path names) as well
83+
as its multi-stage installer.

guides/writing-addons/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Should cover where to put dependencies in package.json, how to export specific assets -->
1+
<!-- Should cover where to put dependencies in package.json, how to export specific assets -->

guides/writing-addons/deploying.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- This section should at least give people some clues about how to do a local production build, try it out locally, and then link to resources on publishing to npm -->
1+
<!-- This section should at least give people some clues about how to do a local production build, try it out locally, and then link to resources on publishing to npm -->

guides/writing-addons/documenting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Should mention that many authors use the dummy app for their documentation. Should link to ember-cli-addon-docs, with clear indication of its status as a community project -->
1+
<!-- Should mention that many authors use the dummy app for their documentation. Should link to ember-cli-addon-docs, with clear indication of its status as a community project -->

guides/writing-addons/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ If we want other people to be able to use our addon, we need to specify a name,
4242

4343
#### `config/ember-try.js`
4444

45-
This is a place to configure which versions of Ember that the test suite should check for compatibility. See the [ember-try](https://github.com/ember-cli/ember-try) repository on GitHub for more information.
45+
This is a place to configure which versions of Ember that the test suite should check for compatibility. See the [ember-try](https://github.com/ember-cli/ember-try) repository on GitHub for more information.

guides/writing-addons/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Should cover ember-try, tests, and using the dummy app in testing. See ember-styleguide and popular addons for inspiration -->
1+
<!-- Should cover ember-try, tests, and using the dummy app in testing. See ember-styleguide and popular addons for inspiration -->

guides/writing-addons/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,4 @@ Lastly, be sure to provide a few notes about how others can contribute to the pr
290290

291291
## Advanced addon configuration
292292

293-
<!-- Help wanted! -->
293+
<!-- Help wanted! -->

guides/writing-addons/wrappers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Supplemental information to help someone write an Ember wrapper. Do not repeat content from the tutorial. -->
1+
<!-- Supplemental information to help someone write an Ember wrapper. Do not repeat content from the tutorial. -->

0 commit comments

Comments
 (0)