Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port over managing dependencies #19

Merged

Conversation

BradenLawrence
Copy link
Contributor

Add managing dependancies markdown, taken from ember-cli.com
- Addressing issue #3, "Port over managing dependencies."
- Converted the markdown file found here: https://raw.githubusercontent.com/ember-cli/ember-cli.github.io/master/_posts/2013-04-08-managing-dependencies.md

 - Addressing issue ember-learn#3, item 10, "Port over Common Issues. Mostly copy and paste from this source code"
 - Converted the markdown file found here: https://raw.githubusercontent.com/ember-cli/ember-cli.github.io/master/_posts/2013-04-03-common-issues.md
 - Clarify the heading for the npm packages section
 - Add a description for the Canary build section
 - Remove PhantomJS section
 - Fix the link to Vagrant to include https
 - Commenting out Docker section until it can be rewritten without using PhantomJS
@jenweber jenweber merged commit 9fa01d3 into ember-learn:master Oct 11, 2018
@Gaurav0
Copy link
Contributor

Gaurav0 commented Oct 11, 2018

@BradenLawrence @jenweber I don't think this belongs in "writing addons" because this is mostly about importing and customizing dependencies which can either be done in the app via ember-cli-build.js or in the addon via index.js. How exactly it should be organized probably deserves further discussion on discord. Will post a link to this comment.

exports as the second:

```javascript
app.import('bower_components/ic-ajax/dist/named-amd/main.js');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to show how to add list of modules and exports

Ember CLI supports [NPM](https://www.npmjs.com), [yarn](https://yarnpkg.com/)
and optionally [Bower](http://bower.io/) for dependency management. It will
detect whether you are using npm or yarn by the presence of a `yarn.lock` file
in your project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention it will use yarn when there is both a yarn.lock and a package-lock.json

A newly generated Ember CLI project only has NPM dependencies, so you will
notice a `package.json` file at the root of your project, but not a `bower.json`.
To use Bower packages, you will have to first run `bower init` to create a
`bower.json` file also at the root of the project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be not recommended to use bower. It is not officially deprecated, but it should be.

files allows collaborators to fork your repo and get their dependencies installed
locally by executing `npm install` and `bower install` themselves.

Ember CLI watches `bower.json` for changes. Thus it reloads your app if you
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but does not watch node_modules.

icAjaxRaw( /* ... */ );
```

##### Standard Anonymous AMD Asset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add a section for cjs asset

BradenLawrence added a commit to BradenLawrence/cli-guides-source that referenced this pull request Oct 20, 2018
 - Partially addressing issue ember-learn#21
 - Followup to PR ember-learn#19
 - Replaced Bower with Yarn where it makes sense
 - Explained interaction between yarn.lock and package-lock.json
 - Explained how EmberCLI does not watch for npm install packages
 - Did NOT address any of the Bower references within code examples
Gaurav0 pushed a commit that referenced this pull request Oct 26, 2018
* Remove references to Bower
 - Partially addressing issue #21
 - Followup to PR #19
 - Replaced Bower with Yarn where it makes sense
 - Explained interaction between yarn.lock and package-lock.json
 - Explained how EmberCLI does not watch for npm install packages
 - Did NOT address any of the Bower references within code examples

* Correct capitalization and improve clarity
 - Change all instances of NPM to npm
 - Change all instances of yarn to Yarn
 - Clarify users would be installing and using Yarn,
   not just including a yarn.lock file
 - Add node_module as a location assets can be imported from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants