public function enqueueRequireJsLibs(array $deps = []): array
    {
        if (($data = $this->didEnqueueLibs(__METHOD__))) {
            return $data; // Did this already.
        } // We only need to enqueue once.

        $data = [
            'scripts' => [
                'requirejs' => [
                    'version' => '2.3.2',
                    'deps'    => $deps, // If applicable.
                    'url'     => '//cdnjs.cloudflare.com/ajax/libs/require.js/%1$s/require.min.js',
                ],
            ],
        ];
        return $this->enqueueLibs(__METHOD__, $data);
    }
public function enqueueRequireJsLibs(array $deps = []): array
    {
        if (($data = $this->didEnqueueLibs(__METHOD__))) {
            return $data; // Did this already.
        } // We only need to enqueue once.

        $data = [
            'scripts' => [
                'requirejs' => [
                    'version' => '2.3.2',
                    'deps'    => $deps, // If applicable.
                    'url'     => '//cdnjs.cloudflare.com/ajax/libs/require.js/%1$s/require.min.js',
                ],
            ],
        ];
        return $this->enqueueLibs(__METHOD__, $data);
    }
public function enqueueRequireJsLibs ( array $ deps = [ ] ) : array { if ( ( $ data = $ this -> didEnqueueLibs ( __METHOD__ ) ) ) { return $ data ; // Did this already. } // We only need to enqueue once. $ data = [ 'scripts' => [ 'requirejs' => [ 'version' => '2.3.2' , 'deps' => $ deps , // If applicable. 'url' => '//cdnjs.cloudflare.com/ajax/libs/require.js/%1$s/require.min.js' , ] , ] , ] ; return $ this -> enqueueLibs ( __METHOD__ , $ data ) ; }
Enqueue Require.js.

@since 170128.18158 Require.js.

@param array $deps An array of any script dependencies.
This is helpful in cases where RequireJS should be loaded up
after other scripts that contain anonymous defines.

@return array Library details.
Enqueue Require . js .