lib/index.js
function copyPattern (pattern) {
  return Object.assign(
    function (context) {
      return function (prevConfig) {
        context.copyPlugin = context.copyPlugin || {patterns: []}

        // Merge the provided advanced pattern into the config
        context.copyPlugin = _extends({}, context.copyPlugin, {
          patterns: [].concat(context.copyPlugin.patterns, [pattern]),
        })

        // Don't alter the config yet
        return prevConfig
      }
    },
    {post: postConfig}
  )
}
function copyPattern (pattern) {
  return Object.assign(
    function (context) {
      return function (prevConfig) {
        context.copyPlugin = context.copyPlugin || {patterns: []}

        // Merge the provided advanced pattern into the config
        context.copyPlugin = _extends({}, context.copyPlugin, {
          patterns: [].concat(context.copyPlugin.patterns, [pattern]),
        })

        // Don't alter the config yet
        return prevConfig
      }
    },
    {post: postConfig}
  )
}
function copyPattern ( pattern ) { return Object . assign ( function ( context ) { return function ( prevConfig ) { context . copyPlugin = context . copyPlugin || { patterns : [ ] } // Merge the provided advanced pattern into the config context . copyPlugin = _extends ( { } , context . copyPlugin , { patterns : [ ] . concat ( context . copyPlugin . patterns , [ pattern ] ) , } ) // Don't alter the config yet return prevConfig } } , { post : postConfig } ) }
Adds an advanced pattern to the list of patterns for the plugin.
Adds an advanced pattern to the list of patterns for the plugin .