src/main/resources/assets/Brocfile.js
/*
 * basic pre-processing before actual build
 */
basic pre-processing before actual build
basic pre - processing before actual build
function createJsTree() {
  var jsTree = pickFiles(dirs.js, {
    srcDir: "./",
    destDir: "",
    files: [
      "**/*.jsx",
      "**/*.js"
    ]
  });
  jsTree = filterReact(jsTree);
  return replace(jsTree, {
    files: ["**/*.js"],
    patterns: [
      {
        match: "ENV", 
        replacement: env
      }
    ]
  });
}
function createJsTree ( ) { var jsTree = pickFiles ( dirs . js , { srcDir : "./" , destDir : "" , files : [ "**/*.jsx" , "**/*.js" ] } ) ; jsTree = filterReact ( jsTree ) ; return replace ( jsTree , { files : [ "**/*.js" ] , patterns : [ { match : "ENV" , replacement : env } ] } ) ; }
basic pre-processing before actual build
basic pre - processing before actual build
// create tree for .js and .jsx // compile react files // replace @@ENV in js code with current BROCCOLI_ENV environment variable // {default: "development" | "production"} // replaces @@ENV