@@ -147,19 +147,10 @@ class MinimapPluginGeneratorElement {
147147 runCommand ( atom . packages . getApmPath ( ) , args , callback , { cwd : packagePath } )
148148 }
149149
150- isStoredInDotAtom ( packagePath ) {
151- const packagesPath = path . join ( atom . getConfigDirPath ( ) , 'packages' , path . sep )
152- if ( packagePath . indexOf ( packagesPath ) === 0 ) { return true }
153-
154- const devPackagesPath = path . join ( atom . getConfigDirPath ( ) , 'dev' , 'packages' , path . sep )
155-
156- return packagePath . indexOf ( devPackagesPath ) === 0
157- }
158-
159150 createPackageFiles ( callback ) {
160151 const packagePath = this . getPackagePath ( )
161152
162- if ( this . isStoredInDotAtom ( packagePath ) ) {
153+ if ( isStoredInDotAtom ( packagePath ) ) {
163154 this . initPackage ( packagePath , ( ) => {
164155 this . installPackage ( packagePath , callback )
165156 } )
@@ -176,6 +167,14 @@ class MinimapPluginGeneratorElement {
176167const minimapPluginGeneratorElement = MinimapPluginGeneratorElement . initClass ( )
177168export default minimapPluginGeneratorElement
178169
170+ function isStoredInDotAtom ( packagePath ) {
171+ const packagesPath = path . join ( atom . getConfigDirPath ( ) , 'packages' , path . sep )
172+ if ( packagePath . indexOf ( packagesPath ) === 0 ) { return true }
173+
174+ const devPackagesPath = path . join ( atom . getConfigDirPath ( ) , 'dev' , 'packages' , path . sep )
175+
176+ return packagePath . indexOf ( devPackagesPath ) === 0
177+ }
179178
180179function runCommand ( command , args , exit , options = { } ) {
181180 return new BufferedProcess ( { command, args, exit, options } )
0 commit comments