This repository was archived by the owner on Jan 6, 2021. It is now read-only.
File tree 9 files changed +27
-27
lines changed
9 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " cross-env" ,
3
3
"version" : " 0.0.0-semantically-released" ,
4
4
"description" : " Run scripts that set and use environment variables across platforms" ,
5
- "main" : " dist /index.js" ,
5
+ "main" : " src /index.js" ,
6
6
"bin" : {
7
- "cross-env" : " dist /bin/cross-env.js" ,
8
- "cross-env-shell" : " dist /bin/cross-env-shell.js"
7
+ "cross-env" : " src /bin/cross-env.js" ,
8
+ "cross-env-shell" : " src /bin/cross-env-shell.js"
9
9
},
10
10
"engines" : {
11
11
"node" : " >=8.0"
12
12
},
13
13
"scripts" : {
14
- "build" : " kcd-scripts build" ,
15
14
"lint" : " kcd-scripts lint" ,
16
15
"test" : " kcd-scripts test" ,
17
16
"validate" : " kcd-scripts validate"
22
21
}
23
22
},
24
23
"files" : [
25
- " dist"
24
+ " src" ,
25
+ " !__tests__"
26
26
],
27
27
"keywords" : [
28
28
" cross-environment" ,
32
32
"author" :
" Kent C. Dodds <[email protected] > (http://kentcdodds.com/)" ,
33
33
"license" : " MIT" ,
34
34
"dependencies" : {
35
- "@babel/runtime" : " ^7.6.2" ,
36
35
"cross-spawn" : " ^7.0.0"
37
36
},
38
37
"devDependencies" : {
41
40
"eslintConfig" : {
42
41
"extends" : " ./node_modules/kcd-scripts/eslint.js"
43
42
},
44
- "eslintIgnore" : [
45
- " node_modules" ,
46
- " coverage" ,
47
- " dist"
48
- ],
43
+ "// babel 1" : " this disables all built-in plugins from kcd-scripts for tests" ,
44
+ "// babel 2" : " that way we ensure that the tests run without compilation" ,
45
+ "// babel 3" : " because this module is published as-is. It is not compiled." ,
46
+ "babel" : {},
49
47
"repository" : {
50
48
"type" : " git" ,
51
49
"url" : " https://github.com/kentcdodds/cross-env.git"
Original file line number Diff line number Diff line change 1
- import isWindowsMock from '../is-windows'
2
- import commandConvert from '../command'
1
+ const isWindowsMock = require ( '../is-windows' )
2
+ const commandConvert = require ( '../command' )
3
3
4
4
jest . mock ( '../is-windows' )
5
5
Original file line number Diff line number Diff line change 1
- import crossSpawnMock from 'cross-spawn'
2
- import isWindowsMock from '../is-windows'
1
+ const crossSpawnMock = require ( 'cross-spawn' )
2
+ const isWindowsMock = require ( '../is-windows' )
3
3
4
4
jest . mock ( '../is-windows' )
5
5
jest . mock ( 'cross-spawn' )
Original file line number Diff line number Diff line change 1
- import isWindows from '../is-windows'
1
+ const isWindows = require ( '../is-windows' )
2
2
3
3
const {
4
4
platform,
Original file line number Diff line number Diff line change 1
- import isWindowsMock from '../is-windows'
2
- import varValueConvert from '../variable'
1
+ const isWindowsMock = require ( '../is-windows' )
2
+ const varValueConvert = require ( '../variable' )
3
3
4
4
jest . mock ( '../is-windows' )
5
5
Original file line number Diff line number Diff line change 1
- import path from 'path'
2
- import isWindows from './is-windows'
1
+ const path = require ( 'path' )
2
+ const isWindows = require ( './is-windows' )
3
3
4
- export default commandConvert
4
+ module . exports = commandConvert
5
5
6
6
/**
7
7
* Converts an environment variable usage to be appropriate for the current OS
Original file line number Diff line number Diff line change 1
- import { spawn } from 'cross-spawn'
2
- import commandConvert from './command'
3
- import varValueConvert from './variable'
1
+ const { spawn} = require ( 'cross-spawn' )
2
+ const commandConvert = require ( './command' )
3
+ const varValueConvert = require ( './variable' )
4
4
5
5
module . exports = crossEnv
6
6
Original file line number Diff line number Diff line change 1
- export default ( ) =>
1
+ module . exports = ( ) =>
2
2
process . platform === 'win32' || / ^ ( m s y s | c y g w i n ) $ / . test ( process . env . OSTYPE )
Original file line number Diff line number Diff line change 1
- import isWindows from './is-windows'
1
+ const isWindows = require ( './is-windows' )
2
2
3
3
const pathLikeEnvVarWhitelist = new Set ( [ 'PATH' , 'NODE_PATH' ] )
4
4
5
+ module . exports = varValueConvert
6
+
5
7
/**
6
8
* This will transform UNIX-style list values to Windows-style.
7
9
* For example, the value of the $PATH variable "/usr/bin:/usr/local/bin:."
@@ -62,6 +64,6 @@ function resolveEnvVars(varValue) {
62
64
* @param {String } originalName Original name of the env variable
63
65
* @returns {String } Converted value
64
66
*/
65
- export default function varValueConvert ( originalValue , originalName ) {
67
+ function varValueConvert ( originalValue , originalName ) {
66
68
return resolveEnvVars ( replaceListDelimiters ( originalValue , originalName ) )
67
69
}
You can’t perform that action at this time.
0 commit comments