File tree 4 files changed +8
-4
lines changed
4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"presets" : [
3
- " shopify/node "
3
+ " shopify"
4
4
],
5
5
"plugins" : [
6
6
[" add-shopify-header" , {
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : [
3
3
" plugin:shopify/esnext" ,
4
- " plugin:shopify/node" ,
5
- " plugin:shopify/mocha"
4
+ " plugin:shopify/node"
6
5
],
7
6
"rules" : {
8
7
"no-console" : 0 ,
Original file line number Diff line number Diff line change 40
40
"babel-preset-shopify" : " 15.0.1" ,
41
41
"babel-register" : " 6.18.0" ,
42
42
"eslint" : " 3.10.2" ,
43
+ "eslint-plugin-node" : " 3.0.4" ,
43
44
"eslint-plugin-shopify" : " 15.1.0"
44
45
},
45
46
"scripts" : {
Original file line number Diff line number Diff line change 1
1
import { join , normalize } from 'path' ;
2
+ import { existsSync } from 'fs' ;
2
3
import findRoot from 'find-root' ;
3
4
4
5
const workingDirectory = process . cwd ( ) ;
5
6
const currentDirectory = __dirname ;
6
7
7
8
const themeRoot = findRoot ( workingDirectory ) ;
9
+ const defaultGulpPath = join ( themeRoot , normalize ( 'node_modules/.bin/gulp' ) ) ;
10
+ // Legacy path for older versions of Node.
11
+ const legacyGulpPath = join ( themeRoot , normalize ( 'node_modules/@shopify/slate-tools/node_modules/.bin/gulp' ) ) ;
8
12
9
13
const config = {
10
14
gulpFile : join ( currentDirectory , 'gulpfile.js' ) ,
11
- gulp : join ( themeRoot , normalize ( 'node_modules/.bin/gulp' ) ) ,
15
+ gulp : existsSync ( defaultGulpPath ) ? defaultGulpPath : legacyGulpPath ,
12
16
themeRoot,
13
17
} ;
14
18
You can’t perform that action at this time.
0 commit comments