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

Commit04730d9

Browse files
committed
refactor command line service into npm package
1 parent9d2077f commit04730d9

File tree

12 files changed

+11
-65
lines changed

12 files changed

+11
-65
lines changed

‎lib/modules/setup/utils/action-system.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
2-
varcommand_line_1=require('../../../services/command-line');
2+
varatom_plugin_command_line_1=require('atom-plugin-command-line');
33
functionupdateNpm(){
4-
command_line_1.default('npm','update -g npm')
4+
atom_plugin_command_line_1.default('npm','update -g npm')
55
.then(function(res){
66
});
77
}

‎lib/modules/setup/utils/check-system.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"use strict";
2-
varcommand_line_1=require('../../../services/command-line');
2+
varatom_plugin_command_line_1=require('atom-plugin-command-line');
33
functionmatchVersions(v){
44
returnv.match(/([0-9]+)\.([0-9]+)/);
55
}
66
functionminVersion(command,minVersion){
77
returnnewPromise(function(resolve,reject){
8-
varminOrLater=command_line_1.default(command,'-v')
8+
varminOrLater=atom_plugin_command_line_1.default(command,'-v')
99
.then(function(res){
1010
if(parseInt(res,10).toString()==='NaN'){
1111
returnfalse;
@@ -42,7 +42,7 @@ function requiresXCode() {
4242
if(!navigator.platform.match(/Mac/)){
4343
returntrue;
4444
}
45-
returncommand_line_1.default('xcode-select','-v').then(function(res){
45+
returnatom_plugin_command_line_1.default('xcode-select','-v').then(function(res){
4646
if(!!res.match(/xcode-selectversion[0-9]+/)){
4747
returntrue;
4848
}

‎lib/modules/tutorials/utils/update.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use strict";
2-
varcommand_line_1=require('../../../services/command-line');
2+
varatom_plugin_command_line_1=require('atom-plugin-command-line');
33
functiontutorialUpdate(name){
44
console.log("run \"npm install --save-dev "+name+"\"");
55
}
@@ -8,7 +8,7 @@ function canUpdateTutorial(name, currentVersion) {
88
if(!navigator.onLine){
99
returnnull;
1010
}
11-
return(command_line_1.default('npm',"outdated "+name).then(function(res){
11+
return(atom_plugin_command_line_1.default('npm',"outdated "+name).then(function(res){
1212
console.log(res);
1313
if(res.length>0){
1414
varlinked=res.match(/[0-9\.]+\s+linked/);

‎lib/services/command-line.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"atom":">=1.0.0 <2.0.0"
3939
},
4040
"dependencies": {
41+
"atom-plugin-command-line":"^1.0.2",
4142
"highlights":"1.3.1",
4243
"marked":"0.3.5",
4344
"material-ui":"0.15.0",

‎src/modules/setup/utils/action-setup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import{join}from'path';
22
import{open,set,openFolder,openTerminal}from'../../../modules/editor';
3-
importcommandLinefrom'../../../services/command-line';
43
import{setupVerify}from'../actions';
54

65
constpackageData=`{

‎src/modules/setup/utils/action-system.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
importcommandLinefrom'../../../services/command-line';
1+
importcommandLinefrom'atom-plugin-command-line';
22
import{setupVerify}from'../actions';
33

44
exportfunctionupdateNpm():void{

‎src/modules/setup/utils/check-system.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
importcommandLinefrom'../../../services/command-line';
1+
importcommandLinefrom'atom-plugin-command-line';
22

33
functionmatchVersions(v:string):string[]{
44
returnv.match(/([0-9]+)\.([0-9]+)/);

‎src/modules/tutorials/deps.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
services/commandLine
2-
31
actions: alertOpen, tutorialSet

‎src/modules/tutorials/utils/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
importcommandLinefrom'../../../services/command-line';
1+
importcommandLinefrom'atom-plugin-command-line';
22
import{tutorialsFind}from'../actions';
33

44
exportfunctiontutorialUpdate(name:string):void{

‎src/services/command-line.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
"src/modules/window/reducer.ts",
134134
"src/modules/window/types.ts",
135135
"src/reducers.ts",
136-
"src/services/command-line.ts",
137136
"src/services/polyfills.ts",
138137
"src/store.ts",
139138
"src/subscriptions.ts",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp