-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Labels
area: build & ciRelated the build and CI infrastructure of the projectRelated the build and CI infrastructure of the projecteffort1: hours
Milestone
Description
currently we use https://github.com/outaTiME/broccoli-replace in both browser and node tree
this plugin is accounting for 600-700ms during full build and 400-500ms during incremental rebuild.
if you look at the replacements we are doing they are fairly simple and can't cause us to waste that much time.
we should try to reimplement the plugin (with only the features we actually need) in plain javascript without any additional templating libraries. a few regular expression replacements should do the trick. the plugin should be implemented as a DiffingBroccoliPlugin
api compatibility would be nice, but is not required. example usage:
nodeTree = replace(nodeTree, {
files: ['**/test/**/*_spec.js'],
patterns: [
{
// Override the default DOM adapter with Parse5 for all tests
match: /"use strict";/,
replacement:
"'use strict'; var parse5Adapter = require('angular2/src/dom/parse5_adapter'); " +
"parse5Adapter.Parse5DomAdapter.makeCurrent();"
},
{
// Append main() to all tests since all of our tests are wrapped in exported main fn
match: /$/g,
replacement: "\r\n main();"
}
]
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: build & ciRelated the build and CI infrastructure of the projectRelated the build and CI infrastructure of the projecteffort1: hours