protected function parseModes()
    {
        foreach ($this->modeDirs as $dir) {
            $absDir = $this->fileLocator->locate($dir);

            $finder = Finder::create()->files()->in($absDir)->notName("*test.js")->name('*.js');
            
            foreach ($finder as $file) {
                $this->addModesFromFile($dir,$file);
            }
        }
        #save to cache if env prod
        if ($this->env == 'prod') {
            $this->cacheDriver->save(static::CACHE_MODES_NAME, $this->getModes());
        }
    }