public void Precompile(IAssetPipeline pipeline, IAssetRegistration registration) { var allFiles = pipeline.AllFiles().Where(x => x.Extension() == ".js"); allFiles.Each(x => { var name = x.LibraryName(); var content = _fileSystem.ReadStringFromFile(x.FullPath); var match = _regex.Match(content); if (!match.Success) { return; } var tag = match.Groups[1].Value; var dependencies = match.Groups[3].Value; dependencies = _replacements .Aggregate(dependencies, (current, value) => current.Replace(value, "")); var assets = dependencies.Split(','); //register all requirejs depedencies into asset graph foreach (var asset in assets) { registration.Dependency(name, "{0}.js".ToFormat(asset)); } if (tag == "require") { _registry.Register(x); } }); }
public void SetUp() { theRegistration = MockRepository.GenerateMock <IAssetRegistration>(); theRegistry = new FubuRegistry(); theExpression = new AssetsExpression(theRegistry, theRegistration); }
public void SetUp() { theRegistration = MockRepository.GenerateMock<IAssetRegistration>(); theRegistry = new FubuRegistry(); theExpression = new AssetsExpression(theRegistry, theRegistration); }
public void Replay(IAssetRegistration registration) { _registrations.Each(x => x(registration)); }
public AssetsExpression(FubuRegistry registry, IAssetRegistration registration) { _registry = registry; _registration = new Lazy <IAssetRegistration>(() => registration); }
public AssetFileExpression(AssetsExpression parent, string assetName) { _parent = parent; _assetName = assetName; _registration = _parent._registration.Value; }
public AssetDslReader(IAssetRegistration registration) { _registration = registration; }
public AssetDslReader(IAssetRegistration registration) { _registration = registration; }
public void Replay(IAssetRegistration registration) { _registrations.Each(x => x(registration)); }
public void SetUp() { theUnderlyingRegistration = MockRepository.GenerateMock<IAssetRegistration>(); }
public void SetUp() { theUnderlyingRegistration = MockRepository.GenerateMock <IAssetRegistration>(); }
public AssetRegistrationDiagnostics(IAssetRegistration inner, AssetLogsCache logs) { _inner = inner; _logs = logs; }
public AssetRegistrationDiagnostics(IAssetRegistration inner, AssetLogsCache logs) { _inner = inner; _logs = logs; }