Skip to content

Feature/upgrade build #3

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

Merged
merged 5 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
upgrade build progress
  • Loading branch information
ShMcK committed Jun 7, 2020
commit dcf36c940509a90252f701616966f533fec7f5e7
157 changes: 0 additions & 157 deletions CODEROAD.md → TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@

> The Node Package Manager (NPM) is a command-line tool used by developers to share and control modules (or packages) of JavaScript code written for use with Node.js.

```config
config:
testRunner:
command: npm run programmatic-test
path: coderoad
actions:
commits:
- '55a9b6d'
- 'd58d630'
commands:
- npm install
repo:
uri: https://github.com/coderoad/fcc-learn-npm
branch: v0.3.0
dependencies:
- name: node
version: >=10
```

## Intro

> Introduction to the package.json
Expand Down Expand Up @@ -49,21 +30,6 @@ One of the most common pieces of information in this file is the `author` field.

### Step 1

```config
setup:
files:
- package.json
commits:
- '5326ec8'
commands:
- npm install
solution:
files:
- package.json
commits:
- '424cf66'
```

Add your name as the `author` of the project in the package.json file.
**Note:** Remember that you’re writing JSON, so all field names must use double-quotes (") and be separated with a comma (,).

Expand All @@ -84,19 +50,6 @@ Here's an example:

### Step 1

```config
setup:
files:
- package.json
commits:
- '68ddb97'
solution:
files:
- package.json
commits:
- '138ad0e'
```

Add a `description` to the package.json file of your project.

**Note:** Remember to use double-quotes for field-names (") and commas (,) to separate fields.
Expand All @@ -117,19 +70,6 @@ As you can see, this field is structured as an array of double-quoted strings.

### Step 1

```config
setup:
files:
- package.json
commits:
- '2069439'
solution:
files:
- package.json
commits:
- 'f2ed460'
```

Add an array of suitable strings to the `keywords` field in the package.json file of your project.

One of the keywords should be "freecodecamp".
Expand All @@ -148,19 +88,6 @@ Some common licenses for open source projects include MIT and BSD. License infor

### Step 1

```config
setup:
files:
- package.json
commits:
- 'f2229d1'
solution:
files:
- package.json
commits:
- '9378267'
```

Fill the `license` field in the package.json file of your project as you find suitable.

## Version
Expand All @@ -175,19 +102,6 @@ A `version` is one of the required fields of your package.json file. This field

### Step 1

```config
setup:
files:
- package.json
commits:
- '60a4e7b'
solution:
files:
- package.json
commits:
- 'f9f7f29'
```

Add a `version` to the package.json file of your project.

## External Packages
Expand Down Expand Up @@ -217,22 +131,6 @@ Installed packages are created in a `node_modules` folder in your project. Avoid

### Step 1

```config
setup:
files:
- package.json
commits:
- 'e97c095'
watchers:
- package.json
- node_modules/moment
solution:
files:
- package.json
commits:
- '97af83a'
```

Install the "moment" package to the `dependencies` field of your package.json file by running the command line npm install.

**Note:** Moment is a handy library for working with time and dates.
Expand Down Expand Up @@ -264,22 +162,6 @@ npm install express@4.17.0

### Step 1

```config
setup:
files:
- package.json
commits:
- 'be03933'
watchers:
- package.json
- node_modules/moment
solution:
files:
- package.json
commits:
- 'ba77ae7'
```

In the dependencies section of your package.json file, change the `version` of moment to match MAJOR version 2, MINOR version 10 and PATCH version 2

## Receive Patch Updates
Expand All @@ -296,19 +178,6 @@ To allow an npm dependency to update to the latest PATCH version, you can prefix

### Step 1

```config
setup:
files:
- package.json
commits:
- 'c4ff0f6'
solution:
files:
- package.json
commits:
- 'cc1f2a5'
```

In the package.json file, your current rule for how npm may upgrade moment is to use a specific version (2.10.2). But now, you want to allow the latest 2.10.x version.
Use the tilde (`~`) character to prefix the version of moment in your dependencies, and allow npm to update it to any new PATCH release.

Expand All @@ -330,19 +199,6 @@ This would allow updates to any 1.x.x version of the package.

### Step 1

```config
setup:
files:
- package.json
commits:
- 'fb75ecf'
solution:
files:
- package.json
commits:
- 'd0e1a22'
```

Use the caret (`^`) to prefix the version of moment in your dependencies and allow npm to update it to any new MINOR release.

**Note:** The version numbers themselves should not be changed.
Expand All @@ -359,19 +215,6 @@ This same method applies to removing other fields in your package.json as well.

### Step 1

```config
setup:
files:
- package.json
commits:
- 'da1e99e'
solution:
files:
- package.json
commits:
- '796b176'
```

Remove the moment package from your dependencies.

**Note:** Make sure you have the right amount of commas after removing it.
2 changes: 1 addition & 1 deletion coderoad-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"repo": {
"uri": "https://github.com/coderoad/fcc-learn-npm",
"branch": "v0.3.0"
"branch": "v0.4.0"
},
"dependencies": [{
"name": "node",
Expand Down
108 changes: 108 additions & 0 deletions coderoad.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
version: "0.4.0"
config:
testRunner:
command: ./node_modules/.bin/mocha
args:
filter: --grep
tap: --reporter=mocha-tap-reporter
setup:
commands:
- npm install
directory: coderoad
repo:
uri: https://github.com/coderoad/fcc-learn-npm
branch: v0.4.0
dependencies:
- name: node
version: '>=10'
levels:
- id: L1
- id: L2
steps:
- id: L2S1
setup:
commands:
- npm install
files:
- package.json
solution:
files:
- package.json
- id: L3
steps:
- id: L3S1
setup:
files:
- package.json
solution:
files:
- package.json
- id: L4
steps:
- id: L4S1
setup:
files:
- package.json
soluition:
files:
- package.json
- id: L5
steps:
- id: L5S1
setup:
files:
- package.json
- id: L6
steps:
- id: L6S1
setup:
files:
- package.json
- id: L7
steps:
- id: L7S1
setup:
files:
- package.json
watchers:
- package.json
- node_modules/moment
solution:
files:
- package.json
- id: L8
steps:
- id: L8S1
setup:
files:
- package.json
watchers:
- package.json
- node_modules/moment
- id: L9
steps:
- id: L9S1
setup:
files:
- package.json
solution:
files:
- package.json
- id: L10
steps:
- id: L10S1
setup:
files:
- package.json
solution:
files:
- package.json
- id: L11
steps:
- id: L11S1
setup:
files:
- package.json
solution:
files:
- package.json