Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ff4521

Browse files
committed
initial commit
0 parents  commit8ff4521

23 files changed

+710
-0
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

‎img/1.1-solution_result.jpg

7.77 KB
Loading

‎img/1.1_result.jpg

7.45 KB
Loading

‎img/1.2-solution_result.jpg

8.19 KB
Loading

‎img/1.2_result.jpg

7.56 KB
Loading

‎img/1.3-solution_result.jpg

7.88 KB
Loading

‎img/1.3_result.jpg

7.39 KB
Loading

‎img/author_result.jpg

77.6 KB
Loading

‎img/description_result.jpg

114 KB
Loading

‎img/init_result.jpg

6.66 KB
Loading

‎img/intro_result.jpg

148 KB
Loading

‎img/keywords_result.jpg

70.4 KB
Loading

‎img/logo.jpg

7.31 KB
Loading

‎img/overview_result.jpg

341 KB
Loading

‎img/solution-1.png

13 KB
Loading

‎img/solution-2.png

19.5 KB
Loading

‎img/solution-3.png

21.7 KB
Loading

‎img/test-1.png

52.4 KB
Loading

‎img/test-2.png

55.9 KB
Loading

‎img/test-3.png

74.8 KB
Loading

‎index.html

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
<!DOCTYPE html>
2+
3+
<head>
4+
<linkrel="stylesheet"type="text/css"href="styles.css"/>
5+
<title>CodeRoad Tutorial Visualization</title>
6+
</head>
7+
8+
<body>
9+
<headerclass="header">
10+
<imgclass="header-img"src="img/logo.jpg"/>
11+
<h1class="header-text">Code Road</h1>
12+
</header>
13+
14+
<divclass="title">
15+
Visualization of a Code Road tutorial repo
16+
<br/>
17+
Click to see more info
18+
</div>
19+
20+
<mainclass="main">
21+
<divclass="flowchart">
22+
<divclass="flow flow-main-repo">Learn NPM Repo</div>
23+
<divclass="flow branch branch-master">master</div>
24+
<divclass="flow branch branch-version">v0.1.0</div>
25+
<divclass="flow file file-project">Project Files</div>
26+
<divclass="flow file file-coderoad">CODEROAD.md</div>
27+
<divclass="flow file file-config">config.json</div>
28+
<divclass="flow repo repo-tutorials">Tutorials Repo</div>
29+
<divclass="flow repo repo-coderoad">CodeRoad Repo</div>
30+
</div>
31+
32+
<divclass="column-wrap">
33+
<divclass="column column-1">
34+
<divclass="commit-img-group commit-img-group-1">
35+
<imgclass="commit-img"src="img/init_result.jpg"/>
36+
</div>
37+
<divclass="commit-img-group commit-img-group-2">
38+
<imgclass="commit-img"src="img/1.1_result.jpg"/>
39+
<imgclass="commit-img"src="img/test-1.png"/>
40+
</div>
41+
<divclass="commit-img-group commit-img-group-3">
42+
<imgclass="commit-img"src="img/1.1-solution_result.jpg"/>
43+
<imgclass="commit-img"src="img/solution-1.png"/>
44+
</div>
45+
<divclass="commit-img-group commit-img-group-4">
46+
<imgclass="commit-img"src="img/1.2_result.jpg"/>
47+
<imgclass="commit-img"src="img/test-2.png"/>
48+
</div>
49+
<divclass="commit-img-group commit-img-group-5">
50+
<imgclass="commit-img"src="img/1.2-solution_result.jpg"/>
51+
<imgclass="commit-img"src="img/solution-2.png"/>
52+
</div>
53+
<divclass="commit-img-group commit-img-group-6">
54+
<imgclass="commit-img"src="img/1.3_result.jpg"/>
55+
<imgclass="commit-img"src="img/test-3.png"/>
56+
</div>
57+
<divclass="commit-img-group commit-img-group-7">
58+
<imgclass="commit-img"src="img/1.3-solution_result.jpg"/>
59+
<imgclass="commit-img"src="img/solution-3.png"/>
60+
</div>
61+
</div>
62+
<divclass="column column-2">
63+
<divclass="markdown-filename">
64+
<a
65+
href="https://github.com/coderoad/fcc-learn-npm/blob/master/CODEROAD.md"
66+
target="_blank"
67+
>COADROAD.md</a
68+
>
69+
</div>
70+
<preclass="markdown-pre">
71+
<divclass="lesson-1-markdown"># Learn NPM package json</div>
72+
73+
<divclass="lesson-1-markdown">> 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.</div>
74+
75+
```config
76+
config:
77+
testRunner:
78+
command: npm run programmatic-test
79+
repo:
80+
uri: https://github.com/coderoad/fcc-learn-npm
81+
branch: v0.1.0
82+
dependencies:
83+
- name: node
84+
version: ^10
85+
```
86+
87+
<divclass="lesson-1-markdown lesson-2-markdown">## Intro</div>
88+
89+
<divclass="lesson-1-markdown">> Introduction to the package.json</div>
90+
91+
<divclass="lesson-2-markdown">When starting a new project, NPM generates a package.json file. This file lists the package dependencies for your project. Since NPM packages are regularly updated, the package.json file allows you to set specific version numbers for each dependency. This ensures that updates to a package don't break your project.
92+
93+
NPM saves packages in a folder named node_modules. These packages can be installed in two ways:
94+
95+
- globally in a root node_modules folder, accessible by all projects.
96+
- locally within a project's own node_modules folder, accessible only to that project.
97+
98+
Most developers prefer to install packages local to each project to create a separation between the dependencies of different projects.
99+
100+
The `package.json` file is the center of any Node.js project or NPM package. It stores information about your project, similar to how the &lt;head&gt; section of an HTML document describes the content of a webpage. It consists of a single JSON object where information is stored in key-value pairs. There are only two required fields; "name" and "version", but it’s good practice to provide additional information about your project that could be useful to future users or maintainers.
101+
If you look at the file tree of your project, you will find the package.json file on the top level of the tree. This is the file that you will be improving in the next couple of challenges.</div>
102+
103+
<divclass="lesson-1-markdown lesson-3-markdown">## Author</div>
104+
105+
<divclass="lesson-1-markdown">> Package.json author</div>
106+
107+
<divclass="lesson-3-markdown">One of the most common pieces of information in this file is the `author` field. It specifies who created the project, and can consist of a string or an object with contact or other details. An object is recommended for bigger projects, but a simple string like the following example will do for this project.
108+
109+
```json
110+
"author": "Jane Doe",
111+
```</div>
112+
113+
### Step 1
114+
115+
```config
116+
setup:
117+
files:
118+
- package.json
119+
commits:
120+
<divclass="commit-1-markdown"> - '26e502d'</div>
121+
<divclass="commit-2-markdown"> - 'e39ab72'</div>
122+
commands:
123+
- npm install
124+
solution:
125+
files:
126+
- package.json
127+
commits:
128+
<divclass="commit-3-markdown"> - '72fa9de'</div>
129+
```
130+
131+
<divclass="lesson-3-markdown">Add your name as the `author` of the project in the package.json file.</div>
132+
133+
<divclass="lesson-3-markdown">**Note:** Remember that you’re writing JSON, so all field names must use double-quotes (") and be separated with a comma (,).</div>
134+
135+
<divclass="lesson-1-markdown lesson-4-markdown">## Description</div>
136+
137+
<divclass="lesson-1-markdown">> Package.json description</div>
138+
139+
<divclass="lesson-4-markdown">The next part of a good package.json file is the `description` field; where a short, but informative description about your project belongs.
140+
If you some day plan to publish a package to NPM, this is the string that should sell your idea to the user when they decide whether to install your package or not. However, that’s not the only use case for the description, it’s a great way to summarize what a project does. It’s just as important in any Node.js project to help other developers, future maintainers or even your future self understand the project quickly.
141+
142+
Regardless of what you plan for your project, a description is definitely recommended.
143+
144+
Here's an example:
145+
146+
```json
147+
"description": "A project that does something awesome",
148+
```</div>
149+
150+
### Step 1
151+
152+
```config
153+
setup:
154+
files:
155+
- package.json
156+
commits:
157+
<divclass="commit-4-markdown"> - '64bd78f'</div>
158+
solution:
159+
files:
160+
- package.json
161+
commits:
162+
<divclass="commit-5-markdown"> - '7888392'</div>
163+
```
164+
165+
<divclass="lesson-4-markdown">Add a `description` to the package.json file of your project.</div>
166+
167+
<divclass="lesson-4-markdown">**Note:** Remember to use double-quotes for field-names (") and commas (,) to separate fields.</div>
168+
169+
<divclass="lesson-1-markdown lesson-5-markdown">## Keywords</div>
170+
171+
<divclass="lesson-1-markdown">> Package.json keywords</div>
172+
173+
<divclass="lesson-5-markdown">The `keywords` field is where you can describe your project using related keywords.
174+
175+
Here's an example:
176+
177+
```json
178+
"keywords": [ "descriptive", "related", "words" ],
179+
```
180+
181+
As you can see, this field is structured as an array of double-quoted strings.</div>
182+
183+
### Step 1
184+
185+
```config
186+
setup:
187+
files:
188+
- package.json
189+
commits:
190+
<divclass="commit-6-markdown"> - '54540f6'</div>
191+
solution:
192+
files:
193+
- package.json
194+
commits:
195+
<divclass="commit-7-markdown"> - '803ab94'</div>
196+
```
197+
198+
<divclass="lesson-5-markdown">Add an array of suitable strings to the `keywords` field in the package.json file of your project.</div>
199+
200+
<divclass="lesson-5-markdown">One of the keywords should be "freecodecamp".</div>
201+
</pre>
202+
</div>
203+
<divclass="column column-3">
204+
<imgclass="lesson-img"src="img/overview_result.jpg"/>
205+
<imgclass="lesson-img"src="img/intro_result.jpg"/>
206+
<imgclass="lesson-img"src="img/author_result.jpg"/>
207+
<img
208+
class="lesson-img description-img"
209+
src="img/description_result.jpg"
210+
/>
211+
<imgclass="lesson-img keywords-img"src="img/keywords_result.jpg"/>
212+
</div>
213+
</div>
214+
<divclass="tip-wrap">
215+
<divclass="tip"></div>
216+
<spanclass="close-tip-btn">x</span>
217+
</div>
218+
</main>
219+
220+
<scripttype="text/javascript"src="index.js"></script>
221+
</body>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp