File tree 5 files changed +19
-19
lines changed
5 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " @hover/hvr-scripts " ,
2
+ "name" : " @hover/javascript " ,
3
3
"version" : " 0.0.0-semantically-released" ,
4
4
"description" : " CLI toolbox for common scripts for JavaScript + TypeScript projects" ,
5
5
"engines" : {
6
6
"node" : " >= 8" ,
7
7
"npm" : " >= 5"
8
8
},
9
9
"bin" : {
10
- "hvr -scripts" : " dist/index.js"
10
+ "hover -scripts" : " dist/index.js"
11
11
},
12
12
"scripts" : {
13
13
"test" : " node src test" ,
108
108
],
109
109
"repository" : {
110
110
"type" : " git" ,
111
- "url" : " https://github.com/hoverinc/hvr-scripts .git"
111
+ "url" : " https://github.com/hoverinc/hover-javascript .git"
112
112
},
113
113
"bugs" : {
114
- "url" : " https://github.com/hoverinc/hvr-scripts /issues"
114
+ "url" : " https://github.com/hoverinc/hover-javascript /issues"
115
115
},
116
- "homepage" : " https://github.com/hoverinc/hvr-scripts #readme" ,
116
+ "homepage" : " https://github.com/hoverinc/hover-javascript #readme" ,
117
117
"devDependencies" : {
118
118
"jest-in-case" : " ^1.0.2" ,
119
119
"slash" : " ^3.0.0"
Original file line number Diff line number Diff line change @@ -23,17 +23,17 @@ test('appDirectory is the dirname to the package.json', () => {
23
23
expect ( require ( '../utils' ) . appDirectory ) . toBe ( pkgPath )
24
24
} )
25
25
26
- test ( 'resolveHvrScripts resolves to src/index.js when in the hvr-scripts package' , ( ) => {
27
- mockPkg ( { package : { name : '@hover/hvr-scripts ' } } )
28
- expect ( require ( '../utils' ) . resolveHvrScripts ( ) ) . toBe (
26
+ test ( 'resolveHoverScripts resolves to src/index.js when in the @hover/javascript package' , ( ) => {
27
+ mockPkg ( { package : { name : '@hover/javascript ' } } )
28
+ expect ( require ( '../utils' ) . resolveHoverScripts ( ) ) . toBe (
29
29
require . resolve ( '../' ) . replace ( process . cwd ( ) , '.' ) ,
30
30
)
31
31
} )
32
32
33
- test ( 'resolveHvrScripts resolves to hvr -scripts if not in the kcd-scripts package' , ( ) => {
34
- mockPkg ( { package : { name : 'not-hvr-scripts ' } } )
33
+ test ( 'resolveHoverScripts resolves to "hover -scripts" if not in the @hover/javascript package' , ( ) => {
34
+ mockPkg ( { package : { name : 'not-@nover/javascript ' } } )
35
35
whichSyncMock . mockImplementationOnce ( ( ) => require . resolve ( '../' ) )
36
- expect ( require ( '../utils' ) . resolveHvrScripts ( ) ) . toBe ( 'hvr -scripts' )
36
+ expect ( require ( '../utils' ) . resolveHoverScripts ( ) ) . toBe ( 'hover -scripts' )
37
37
} )
38
38
39
39
test ( `resolveBin resolves to the full path when it's not in $PATH` , ( ) => {
Original file line number Diff line number Diff line change 1
- const { resolveHvrScripts , resolveBin, isOptedOut} = require ( '../utils' )
1
+ const { resolveHoverScripts , resolveBin, isOptedOut} = require ( '../utils' )
2
2
3
- const kcdScripts = resolveHvrScripts ( )
3
+ const kcdScripts = resolveHoverScripts ( )
4
4
const doctoc = resolveBin ( 'doctoc' )
5
5
6
6
module . exports = {
Original file line number Diff line number Diff line change 2
2
let shouldThrow
3
3
try {
4
4
shouldThrow =
5
- require ( `${ process . cwd ( ) } /package.json` ) . name === '@hover/hvr-scripts ' &&
5
+ require ( `${ process . cwd ( ) } /package.json` ) . name === '@hover/javascript ' &&
6
6
Number ( process . version . slice ( 1 ) . split ( '.' ) [ 0 ] ) < 8
7
7
} catch ( error ) {
8
8
// ignore
9
9
}
10
10
11
11
if ( shouldThrow ) {
12
12
throw new Error (
13
- 'You must use Node version 8 or greater to run the scripts within hvr-scripts ' +
13
+ 'You must use Node version 8 or greater to run the scripts within @hover/javascript ' +
14
14
'because we dogfood the untranspiled version of the scripts.' ,
15
15
)
16
16
}
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ const {package: pkg, path: pkgPath} = readPkgUp.sync({
12
12
} )
13
13
const appDirectory = path . dirname ( pkgPath )
14
14
15
- function resolveHvrScripts ( ) {
16
- if ( pkg . name === '@hover/hvr-scripts ' ) {
15
+ function resolveHoverScripts ( ) {
16
+ if ( pkg . name === '@hover/javascript ' ) {
17
17
return require . resolve ( './' ) . replace ( process . cwd ( ) , '.' )
18
18
}
19
- return resolveBin ( 'hvr -scripts' )
19
+ return resolveBin ( 'hover -scripts' )
20
20
}
21
21
22
22
// eslint-disable-next-line complexity
@@ -187,7 +187,7 @@ module.exports = {
187
187
parseEnv,
188
188
pkg,
189
189
resolveBin,
190
- resolveHvrScripts ,
190
+ resolveHoverScripts ,
191
191
uniq,
192
192
writeExtraEntry,
193
193
}
You can’t perform that action at this time.
0 commit comments