Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit b1f2d60

Browse files
committed
build: Yarn -> NPM
1 parent 56a2efc commit b1f2d60

8 files changed

Lines changed: 20439 additions & 16205 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
.cache
33
node_modules
44
yarn-error.log
5-
package-lock.json
65

76
# Build directory
87
/public
@@ -13,3 +12,4 @@ package-lock.json
1312
coverage
1413
.vscode
1514
.history
15+
yarn.lock

.travis.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ env:
77
- COMMAND=build
88
- COMMAND=test-ci
99

10-
before_install:
11-
- npm install -g yarn
12-
13-
install: yarn --frozen-lockfile
14-
1510
cache:
16-
yarn: true
11+
npm: true
1712
directories:
1813
- 'node_modules'
1914

2015
script:
21-
- yarn run $COMMAND
16+
- npm run $COMMAND

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,21 @@
2626

2727
## 🚀 Get Started
2828

29-
1. **Install Yarn (if Yarn Package Manager is not available on your machine).**
30-
31-
Yarn has an [installation guide](https://yarnpkg.com/en/docs/install) for your specific configuration. Happy knitting!
32-
33-
2. **Install dependencies.**
29+
1. **Install dependencies.**
3430

3531
```sh
3632
# install the dependencies
37-
yarn install
33+
npm install
3834
```
3935

40-
3. **Start developing.**
36+
1. **Start developing.**
4137

4238
```sh
4339
# "start": "gatsby develop"
44-
yarn start
40+
npm start
4541
```
4642

47-
4. **Open the source code and start editing!**
43+
1. **Open the source code and start editing!**
4844

4945
Your site is now running at `http://localhost:8000`!
5046

@@ -77,7 +73,7 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje
7773
7874
1. **`/node_modules`**: The directory where all of the modules of code that your project depends on (npm packages) are automatically installed.
7975
80-
2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser), like your site header, or a page template. Src is a convention for source code.
76+
2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser), like your site header, or a page template. "Src" is a convention for "source code."
8177
8278
3. **`.gitignore`**: This file tells git which files it should not track/not maintain a version history.
8379
@@ -89,17 +85,17 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje
8985
9086
7. **`gatsby-browser.tsx`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://next.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
9187
92-
6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins youd like to include, etc. (Check out the [config docs](https://next.gatsbyjs.org/docs/gatsby-config/) for more detail).
88+
6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you'd like to include, etc. (Check out the [config docs](https://next.gatsbyjs.org/docs/gatsby-config/) for more detail).
9389

9490
8. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby node APIs](https://next.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
9591

9692
9. **`gatsby-ssr.tsx`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://next.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
9793

9894
10. **`LICENSE`**: Gatsby is licensed under the MIT license.
9995

100-
11. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You wont change this file directly).
96+
11. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You won't change this file directly).
10197
102-
12. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the projects name, author, etc.). This manifest is how npm knows which packages to install for your project.
98+
12. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project's name, author, etc.). This manifest is how npm knows which packages to install for your project.
10399

104100
13. **`README.md`**: A text file containing useful reference information about your project.
105101

@@ -123,7 +119,7 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
123119

124120
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://next.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
125121

126-
- **To dive straight into code samples head [to our documentation](https://next.gatsbyjs.org/docs/).** In particular, check out the Guides, API reference, and Advanced Tutorials sections in the sidebar.
122+
- **To dive straight into code samples head [to our documentation](https://next.gatsbyjs.org/docs/).** In particular, check out the "Guides", API reference, and "Advanced Tutorials" sections in the sidebar.
127123

128124
## 🏛 Governance
129125

cloudbuild-deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Google Cloud Build config for deploying site to Firebase hosting
2-
#
2+
#
33
# PREREQUISITES:
44
# You must enable firebase and allow Cloud Build to publish to it
55
# 1. Enable the following APIs:
@@ -9,15 +9,15 @@
99
# 2. Grant the following roles to the Cloud Build service account (<your-project-id>@cloudbuild.gserviceaccount.com):
1010
# - Firebase Admin
1111
# - API Keys Admin
12-
# (Alternativey, use a (Firebase Token)[https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/firebase#with-token]
12+
# (Alternativey, use a (Firebase Token)[https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/firebase#with-token]
1313
# to grant publishing access to Cloud Build.)
1414

1515
steps:
1616
- name: 'node:10'
17-
entrypoint: yarn
18-
args: ['install']
17+
entrypoint: npm
18+
args: ['ci']
1919
- name: 'node:10'
20-
entrypoint: yarn
20+
entrypoint: npm
2121
args: ['run', 'build']
2222
- name: 'gcr.io/$PROJECT_ID/firebase'
2323
args: ['deploy', "--project", "$PROJECT_ID", "--only", "hosting"]

cloudbuild.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
steps:
22
- name: 'node:10'
3-
entrypoint: yarn
4-
args: ['install']
3+
entrypoint: npm
4+
args: ['ci']
55
- name: 'node:10'
6-
entrypoint: yarn
6+
entrypoint: npm
77
args: ['run', 'build-ci']
88
env:
99
- 'PATH_PREFIX=staging.nodejs.dev/$SHORT_SHA'

0 commit comments

Comments
 (0)