-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Remove dependencies on yarn #11279
Remove dependencies on yarn #11279
Changes from 6 commits
676795d
5a162a5
be35d96
3381e8c
b480f71
4dd5998
eda21e9
6ba5d10
155e3f5
ff540b9
16e96d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,16 +151,17 @@ Now run `git remote -v` again and notice that you have set up your upstream alia | |
|
||
Now that you have all of the files copied locally you can actually build the code and run a local server to try things out. | ||
|
||
amphtml uses Node.js, the yarn package manager and the Gulp build system to build amphtml and start up a local server that lets you try out your changes. Installing these and getting amphtml built is straightforward: | ||
amphtml uses Node.js, the npm package manager and the Gulp build system to build amphtml and start up a local server that lets you try out your changes. Installing these and getting amphtml built is straightforward: | ||
|
||
* Install [NodeJS](https://nodejs.org/) (which includes npm). | ||
* Install [NodeJS](https://nodejs.org/) version >= 4.7 (which includes npm) | ||
|
||
* Install [yarn](https://yarnpkg.com/en/docs/install) | ||
* Install [npm](https://www.npmjs.com/get-npm) version >= 5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Since installing node also installs npm, this should probably be "upgrade npm to version >= 5". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, PTAL |
||
|
||
* In your local repository directory (e.g. `~/src/ampproject/amphtml`), install the packages that AMP uses by running | ||
``` | ||
yarn | ||
npm install | ||
``` | ||
|
||
You should see a progress indicator and some messages scrolling by. You may see some warnings about optional dependencies that are generally safe to ignore. | ||
|
||
* For some local testing we refer to fake local URLs in order to simulate referencing third party URLs. This requires extra setup so your browser will know that these URLs actually point to your local server. | ||
|
@@ -171,12 +172,14 @@ amphtml uses Node.js, the yarn package manager and the Gulp build system to buil | |
|
||
* The AMP Project uses Gulp as our build system. Gulp uses a configuration file ([gulpfile.js](https://github.com/ampproject/amphtml/blob/master/gulpfile.js)) to build amphtml (including the amphtml javascript) and to start up the Node.js server with the proper settings. You don't really have to understand exactly what it is doing at this point--you just have to install it and use it. | ||
|
||
You can install Gulp using yarn: | ||
You can install Gulp using npm: | ||
|
||
``` | ||
yarn global add gulp | ||
npm install -g gulp | ||
``` | ||
|
||
On some platform the preceding command might require elevated privileges using `sudo`. | ||
|
||
Now whenever you're ready to build amphtml and start up your local server, simply go to your local repository directory and run: | ||
|
||
``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,11 @@ This Quick Start guide is the TL;DR version of the longer [end-to-end guide](get | |
|
||
* [Install and set up Git](https://help.github.com/articles/set-up-git/); in the "Authenticating" step of that page use SSH instead of HTTPS | ||
|
||
* Install [NodeJS](https://nodejs.org/) | ||
* Install [NodeJS](https://nodejs.org/) version >= 4.7 | ||
|
||
* Install [yarn](https://yarnpkg.com/en/docs/install) | ||
* Install [npm](https://www.npmjs.com/get-npm)` version >= 5 | ||
|
||
* Install Gulp by running `yarn global add gulp` | ||
* Install Gulp by running `npm install -g gulp` (on some platforms this command might require elevated privileges using `sudo`) | ||
|
||
* Add this line to your hosts file (`/etc/hosts` on Mac or Linux, `%SystemRoot%\System32\drivers\etc\hosts` on Windows): | ||
|
||
|
@@ -48,7 +48,7 @@ This Quick Start guide is the TL;DR version of the longer [end-to-end guide](get | |
* Go to the branch: `git checkout <branch name>` | ||
|
||
# Build AMP & run a local server | ||
* Make sure you have the latest packages (after you pull): `yarn` | ||
* Make sure you have the latest packages (after you pull): `npm install` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another useful command is to run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added it below in the "Create commits to contain your changes" section |
||
* Start the server: `gulp` | ||
* Access your server at [http://localhost:8000](http://localhost:8000) | ||
* Access your sample pages at [http://localhost:8000/examples](http://localhost:8000/examples) | ||
|
@@ -62,6 +62,7 @@ This Quick Start guide is the TL;DR version of the longer [end-to-end guide](get | |
# Create commits to contain your changes | ||
|
||
* Edit files in your favorite editor | ||
* If you edited `package.json` run `npm prune && npm install` to generate an updated `package-lock.json` file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Add a comma after "If you edited There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
* Add each file you change: `git add <file>` | ||
* Create a commit: `git commit -m "<your commit message>"` | ||
* Instead of `add`ing each file individually you can use the `-a` flag on the commit instead | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing this check, maybe repurpose it to make sure that
package.json
andpackage-lock.json
are updated in lock step? (Heh!)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, PTAL