docs: function parsePackScript(file, context, opts) {
      var content = file.getContent();
      var packScriptFiles = [];
  
      var hasScriptPlaceholder
          = content.indexOf(opts.scriptPlaceholder) !== -1;
      var hasScriptAsyncPlaceholder
          = content.indexOf(opts.scriptAsyncPlaceholder) !== -1;
      var hasRequireConfigPlaceholder
          = content.indexOf(opts.resourceConfigPlaceholder) !== -1;
  
      var getPlaceholder = function (isLoader) {
          if (!opts.autoInsertPlaceholder) {
              return;
          }
          // 在requirejs之后 requrie.config 脚本
          if (isLoader && !hasRequireConfigPlaceholder) {
              hasRequireConfigPlaceholder = true;
              return opts.resourceConfigPlaceholder;
          }
          //在异步入口模块前插入合成后的pkg
          else if (!hasScriptAsyncPlaceholder) {
              hasScriptAsyncPlaceholder = true;
              return opts.scriptAsyncPlaceholder;
          }
      };
      /*
      //在body之前插入scriptPlaceholder
      if(!hasScriptPlaceholder){
          hasScriptPlaceholder = true;
          var rBody = /<!--([\s\S]*?)(?:-->|$)|<\/body>/ig;
           content = content.replace(rBody, function(all, comment) {
            if (comment) {
              return all;
            } else {
              return '\n' + opts.scriptPlaceholder + '\n' + all;
            }
          });
      }*/
  
  
      content = _.parseHtmlScript(content, function (found) {
          var placeholder;
          var match = found.match;
  
          if (found.isScriptLink) {
              var src = found.src;
              var scriptFile = context.getFileByUrl(src, file);
              var loaderName = scriptFile
                  ? scriptFile.basename
                  : _.ext(src).basename;
  
              if (found.isLoader
                  || opts.loaderScripts.indexOf(loaderName) !== -1
              ) {
                  placeholder = getPlaceholder(true);
                  if (placeholder) {
                      return match + placeholder+'\n';
                  }
              }
              else if (scriptFile && opts.packJs) {
                  packScriptFiles.push({
                      file: scriptFile,
                      raw: match,
                      attrs: found.attrs
                  });
              }
          }
          else if (found.isInlineScript) {
              // 对于内联脚本，如果指定了异步入口模块或者包含异步 require，则在前面插入脚本占位符
              if (found.isEntryScript
                  || _.extractAsyncModuleIds(found.inlineContent).length) {
                  placeholder = getPlaceholder();
                  if (placeholder) {
                      return placeholder+'\n' + match;
                  }
              }
          }
  
          return match;
      });
  
      if (packScriptFiles.length
          && !hasScriptPlaceholder
          && opts.autoInsertPlaceholder
      ) {
          var lastScript = packScriptFiles[packScriptFiles.length - 1].raw;
          content = content.replace(lastScript, lastScript + opts.scriptPlaceholder);
      }
  
      file.setContent(content);
      file._initScriptPlacedholder = true;
  
      return packScriptFiles;
  }