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

Commit4e96eb9

Browse files
committed
replace path.resolve with path.join
1 parent144de8a commit4e96eb9

File tree

13 files changed

+22
-21
lines changed

13 files changed

+22
-21
lines changed

‎CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to[Semantic Versioning](http://semver.org/).
44

5-
##[0.12.2] - WIP
6-
- drop "core-coderoad" dependency.
5+
##[0.12.2] - 2016-08-25
6+
- drop "core-coderoad" dependency
7+
- remove additional dependencies for a smaller footprint
78

89
##[0.12.1] - 2016-08-18
910
- remove devDependencies, as Atom installs them and slows the install time significantly

‎lib/components/Page/EditPage/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var editStyle = {
1010
varEditPage=function(_a){
1111
vartutorial=_a.tutorial;
1212
if(tutorial&&tutorial.edit&&tutorial.repo){
13-
varrepoPath=path_1.resolve(tutorial.repo,'edit','master',tutorial.repo);
13+
varrepoPath=path_1.join(tutorial.repo,'edit','master',tutorial.repo);
1414
return(React.createElement("a",{href:repoPath},
1515
React.createElement(mode_edit_1.default,{style:editStyle})
1616
));

‎lib/components/Start/Welcome/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var styles = {
2626
},
2727
};
2828
if(!navigator.platform.match(/Win/)){
29-
varimagePath=path_1.resolve(__dirname,'..','..','..','..','img','coderoad.jpg');
29+
varimagePath=path_1.join(__dirname,'..','..','..','..','img','coderoad.jpg');
3030
styles.header.backgroundImage="url("+imagePath+")";
3131
}
3232
varWelcome=function(_a){

‎lib/modules/alert/reducer.js

Whitespace-only changes.

‎lib/modules/hints/reducer.js

Whitespace-only changes.

‎lib/modules/setup/package-json/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function packageJson(pj, action) {
88
if(pj===void0){pj=null;}
99
switch(action.type){
1010
casetypes_1.SETUP_PACKAGE:
11-
varpathToPackageJson=path_1.resolve(action.payload.dir,'package.json');
11+
varpathToPackageJson=path_1.join(action.payload.dir,'package.json');
1212
returnnode_file_exists_1.default(pathToPackageJson)
1313
?readParse(pathToPackageJson)
1414
:null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var path_1 = require('path');
33
varselectors_1=require('../../../selectors');
44
varpackageData="{\n \"name\": \"demo\",\n \"dependencies\": {\n \"coderoad-functional-school\": \"^0.2.2\"\n }\n}";
55
functioncreatePackageJson(dir){
6-
varpackagePath=path_1.resolve(dir,'package.json');
6+
varpackagePath=path_1.join(dir,'package.json');
77
returnnewPromise(function(resolve,reject){
88
selectors_1.open(packagePath);
99
setTimeout(function(){returnresolve();});

‎lib/modules/tutorial/reducer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ function tutorialReducer(t, action) {
1717
switch(action.type){
1818
casetypes_1.TUTORIAL_SET:
1919
var_a=action.payload,name_1=_a.name,dir=_a.dir,version=_a.version;
20-
varpackagePath=path_1.resolve(dir,'node_modules',name_1);
21-
varpackageJson=require(path_1.resolve(packagePath,'package.json'));
20+
varpackagePath=path_1.join(dir,'node_modules',name_1);
21+
varpackageJson=require(path_1.join(packagePath,'package.json'));
2222
varconfig=config_1.tutorialConfig(packageJson,dir);
23-
varcoderoadJsonPath=path_1.resolve(packagePath,packageJson.main);
23+
varcoderoadJsonPath=path_1.join(packagePath,packageJson.main);
2424
var_b=require(coderoadJsonPath),info=_b.info,pages=_b.pages;
2525
if(configured.indexOf(name_1)===-1){
2626
pages=config_paths_1.default(dir,name_1,config,pages||[]);

‎src/components/Page/EditPage/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{resolve}from'path';
1+
import{join}from'path';
22
import*asReactfrom'react';
33

44
importModeEditfrom'material-ui/svg-icons/editor/mode-edit';
@@ -14,7 +14,7 @@ const EditPage: React.StatelessComponent<{
1414
tutorial:Tutorial.Config
1515
}>=({tutorial})=>{
1616
if(tutorial&&tutorial.edit&&tutorial.repo){
17-
constrepoPath=resolve(tutorial.repo,'edit','master',tutorial.repo);
17+
constrepoPath=join(tutorial.repo,'edit','master',tutorial.repo);
1818
return(
1919
<ahref={repoPath}>
2020
<ModeEditstyle={editStyle}/>

‎src/components/Start/Welcome/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{resolve}from'path';
1+
import{join}from'path';
22
import*asReactfrom'react';
33

44
import{RouteButton}from'../../index';
@@ -31,7 +31,7 @@ let styles = {
3131
// due to url parse/replacing providing
3232
// invalid path
3333
if(!navigator.platform.match(/Win/)){
34-
constimagePath=resolve(
34+
constimagePath=join(
3535
__dirname,'..','..','..','..','img','coderoad.jpg'
3636
);
3737
styles.header.backgroundImage=`url(${imagePath})`;

‎src/modules/setup/package-json/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import{readFileSync}from'fs';
2-
import{resolve}from'path';
2+
import{join}from'path';
33

44
import{SETUP_PACKAGE}from'../types';
55
importfileExistsfrom'node-file-exists';
@@ -12,7 +12,7 @@ export default function packageJson(
1212
switch(action.type){
1313

1414
caseSETUP_PACKAGE:
15-
constpathToPackageJson=resolve(action.payload.dir,'package.json');
15+
constpathToPackageJson=join(action.payload.dir,'package.json');
1616
returnfileExists(pathToPackageJson)
1717
?readParse(pathToPackageJson)
1818
:null;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{resolve}from'path';
1+
import{join}from'path';
22

33
import{open,openFolder,openTerminal,set}from'../../../selectors';
44
import{setupVerify}from'../actions';
@@ -11,7 +11,7 @@ const packageData = `{
1111
}`;
1212

1313
exportfunctioncreatePackageJson(dir:string):Promise<void>{
14-
constpackagePath=resolve(dir,'package.json');
14+
constpackagePath=join(dir,'package.json');
1515
returnnewPromise((resolve,reject)=>{
1616
open(packagePath);
1717
setTimeout(()=>resolve());

‎src/modules/tutorial/reducer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{resolve}from'path';
1+
import{join}from'path';
22

33
import{TUTORIAL_SET}from'./types';
44
import{tutorialConfig}from'./utils/config';
@@ -24,11 +24,11 @@ export default function tutorialReducer(
2424
const{name, dir, version}=action.payload;
2525

2626
// get tutorial package.json
27-
constpackagePath:string=resolve(dir,'node_modules',name);
28-
constpackageJson:PackageJson=require(resolve(packagePath,'package.json'));
27+
constpackagePath:string=join(dir,'node_modules',name);
28+
constpackageJson:PackageJson=require(join(packagePath,'package.json'));
2929

3030
constconfig:Tutorial.Config=tutorialConfig(packageJson,dir);
31-
constcoderoadJsonPath=resolve(packagePath,packageJson.main);
31+
constcoderoadJsonPath=join(packagePath,packageJson.main);
3232
let{info, pages}=require(coderoadJsonPath);
3333

3434
// configure test paths to absolute paths. Only once.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp