1+ < html > < head >
2+ < title > npm-set-script</ title >
3+ < style >
4+ body {
5+ background-color : # ffffff ;
6+ color : # 24292e ;
7+
8+ margin : 0 ;
9+
10+ line-height : 1.5 ;
11+
12+ font-family : -apple-system, BlinkMacSystemFont, "Segoe UI" , Helvetica, Arial, sans-serif, "Apple Color Emoji" , "Segoe UI Emoji" ;
13+ }
14+ # rainbar {
15+ height : 10px ;
16+ background-image : linear-gradient (139deg , # fb8817, # ff4b01, # c12127, # e02aff );
17+ }
18+
19+ a {
20+ text-decoration : none;
21+ color : # 0366d6 ;
22+ }
23+ a : hover {
24+ text-decoration : underline;
25+ }
26+
27+ pre {
28+ margin : 1em 0px ;
29+ padding : 1em ;
30+ border : solid 1px # e1e4e8 ;
31+ border-radius : 6px ;
32+
33+ display : block;
34+ overflow : auto;
35+
36+ white-space : pre;
37+
38+ background-color : # f6f8fa ;
39+ color : # 393a34 ;
40+ }
41+ code {
42+ font-family : SFMono-Regular, Consolas, "Liberation Mono" , Menlo, Courier, monospace;
43+ font-size : 85% ;
44+ padding : 0.2em 0.4em ;
45+ background-color : # f6f8fa ;
46+ color : # 393a34 ;
47+ }
48+ pre > code {
49+ padding : 0 ;
50+ background-color : inherit;
51+ color : inherit;
52+ }
53+ h1 , h2 , h3 {
54+ font-weight : 600 ;
55+ }
56+
57+ # logobar {
58+ background-color : # 333333 ;
59+ margin : 0 auto;
60+ padding : 1em 4em ;
61+ }
62+ # logobar .logo {
63+ float : left;
64+ }
65+ # logobar .title {
66+ font-weight : 600 ;
67+ color : # dddddd ;
68+ float : left;
69+ margin : 5px 0 0 1em ;
70+ }
71+ # logobar : after {
72+ content : "" ;
73+ display : block;
74+ clear : both;
75+ }
76+
77+ # content {
78+ margin : 0 auto;
79+ padding : 0 4em ;
80+ }
81+
82+ # table_of_contents > h2 {
83+ font-size : 1.17em ;
84+ }
85+ # table_of_contents ul : first-child {
86+ border : solid 1px # e1e4e8 ;
87+ border-radius : 6px ;
88+ padding : 1em ;
89+ background-color : # f6f8fa ;
90+ color : # 393a34 ;
91+ }
92+ # table_of_contents ul {
93+ list-style-type : none;
94+ padding-left : 1.5em ;
95+ }
96+ # table_of_contents li {
97+ font-size : 0.9em ;
98+ }
99+ # table_of_contents li a {
100+ color : # 000000 ;
101+ }
102+
103+ header .title {
104+ border-bottom : solid 1px # e1e4e8 ;
105+ }
106+ header .title > h1 {
107+ margin-bottom : 0.25em ;
108+ }
109+ header .title > .description {
110+ display : block;
111+ margin-bottom : 0.5em ;
112+ line-height : 1 ;
113+ }
114+
115+ footer # edit {
116+ border-top : solid 1px # e1e4e8 ;
117+ margin : 3em 0 4em 0 ;
118+ padding-top : 2em ;
119+ }
120+ </ style >
121+ </ head >
122+ < body >
123+ < div id ="banner ">
124+ < div id ="rainbar "> </ div >
125+ < div id ="logobar ">
126+ < svg class ="logo " role ="img " height ="32 " width ="32 " viewBox ="0 0 700 700 ">
127+ < polygon fill ="#cb0000 " points ="0,700 700,700 700,0 0,0 "> </ polygon >
128+ < polygon fill ="#ffffff " points ="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150 "> </ polygon >
129+ </ svg >
130+ < div class ="title ">
131+ npm command-line interface
132+ </ div >
133+ </ div >
134+ </ div >
135+
136+ < section id ="content ">
137+ < header class ="title ">
138+ < h1 id ="npm-set-script "> npm-set-script</ h1 >
139+ < span class ="description "> Set tasks in the scripts section of package.json</ span >
140+ </ header >
141+
142+ < section id ="table_of_contents ">
143+ < h2 id ="table-of-contents "> Table of contents</ h2 >
144+ < div id ="_table_of_contents "> < ul > < li > < a href ="#synopsis "> Synopsis</ a > </ li > < li > < a href ="#see-also "> See Also</ a > </ li > </ ul > </ div >
145+ </ section >
146+
147+ < div id ="_content "> < h3 id ="synopsis "> Synopsis</ h3 >
148+ < p > An npm command that lets you create a task in the scripts section of the package.json.</ p >
149+ < pre lang ="bash "> < code > npm set-script [<script>] [<command>]
150+ </ code > </ pre >
151+ < p > < strong > Example:</ strong > </ p >
152+ < ul >
153+ < li > < code > npm set-script start "http-server ."</ code > </ li >
154+ </ ul >
155+ < pre lang ="json "> < code > {
156+ "name": "my-project",
157+ "scripts": {
158+ "start": "http-server .",
159+ "test": "some existing value"
160+ }
161+ }
162+ </ code > </ pre >
163+ < h3 id ="see-also "> See Also</ h3 >
164+ < ul >
165+ < li > < a href ="../commands/npm-run-script.html "> npm run-script</ a > </ li >
166+ < li > < a href ="../commands/npm-install.html "> npm install</ a > </ li >
167+ < li > < a href ="../commands/npm-test.html "> npm test</ a > </ li >
168+ < li > < a href ="../commands/npm-start.html "> npm start</ a > </ li >
169+ </ ul >
170+ </ div >
171+
172+ < footer id ="edit ">
173+ < a href ="https://github.com/npm/cli/edit/latest/docs/content/commands/npm-set-script.md ">
174+ < svg role ="img " viewBox ="0 0 16 16 " width ="16 " height ="16 " fill ="currentcolor " style ="vertical-align: text-bottom; margin-right: 0.3em; ">
175+ < path fill-rule ="evenodd " d ="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z "> </ path >
176+ </ svg >
177+ Edit this page on GitHub
178+ </ a >
179+ </ footer >
180+ </ section >
181+
182+
183+
184+ </ body > </ html >
0 commit comments