Skip to content

Commit eb2ec33

Browse files
committed
Streams doesn't require the \UserFrosting\DS with new locator
It actually doesn't make sense, as on Unix it would be seen as absolute path within sprinkle location. This scenario is ignored by ResourceLocator.
1 parent 491db09 commit eb2ec33

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

app/sprinkles/core/src/Bakery/BuildAssets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
5454
$this->checkNodeVersion(false);
5555
$this->checkNpmVersion(false);
5656

57-
// Set $path
57+
// Set $buildPath. We'll use the aboslute path for this task
5858
$this->buildPath = \UserFrosting\ROOT_DIR . \UserFrosting\DS . \UserFrosting\BUILD_DIR_NAME;
5959

6060
// Delete cached data is requested

app/sprinkles/core/src/Core.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,15 @@ protected function registerStreams()
127127
$locator->registerStream('session', '', \UserFrosting\APP_DIR . \UserFrosting\DS . \UserFrosting\SESSION_DIR_NAME, true);
128128

129129
// Register core locator sprinkle streams
130-
$locator->registerStream('config', '', \UserFrosting\DS . \UserFrosting\CONFIG_DIR_NAME);
131-
$locator->registerStream('extra', '', \UserFrosting\DS . \UserFrosting\EXTRA_DIR_NAME);
132-
$locator->registerStream('factories', '', \UserFrosting\DS . \UserFrosting\FACTORY_DIR_NAME);
133-
$locator->registerStream('locale', '', \UserFrosting\DS . \UserFrosting\LOCALE_DIR_NAME);
134-
$locator->registerStream('routes', '', \UserFrosting\DS . \UserFrosting\ROUTE_DIR_NAME);
135-
$locator->registerStream('schema', '', \UserFrosting\DS . \UserFrosting\SCHEMA_DIR_NAME);
136-
$locator->registerStream('templates', '', \UserFrosting\DS . \UserFrosting\TEMPLATE_DIR_NAME);
130+
$locator->registerStream('config', '', \UserFrosting\CONFIG_DIR_NAME);
131+
$locator->registerStream('extra', '', \UserFrosting\EXTRA_DIR_NAME);
132+
$locator->registerStream('factories', '', \UserFrosting\FACTORY_DIR_NAME);
133+
$locator->registerStream('locale', '', \UserFrosting\LOCALE_DIR_NAME);
134+
$locator->registerStream('routes', '', \UserFrosting\ROUTE_DIR_NAME);
135+
$locator->registerStream('schema', '', \UserFrosting\SCHEMA_DIR_NAME);
136+
$locator->registerStream('templates', '', \UserFrosting\TEMPLATE_DIR_NAME);
137+
138+
// Register core sprinkle class streams
137139
$locator->registerStream('seeds', '', \UserFrosting\SEEDS_DIR);
138140
$locator->registerStream('migrations', '', \UserFrosting\MIGRATIONS_DIR);
139141

app/sprinkles/core/src/ServicesProvider/ServicesProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function register(ContainerInterface $container)
128128
$locator->registerStream('assets', 'vendor', \UserFrosting\BOWER_ASSET_DIR, true);
129129
$locator->registerStream('assets', 'vendor', \UserFrosting\NPM_ASSET_DIR, true);
130130
$locator->registerStream('assets', 'vendor', \UserFrosting\BROWSERIFIED_ASSET_DIR, true);
131-
$locator->registerStream('assets', '', \UserFrosting\DS . \UserFrosting\ASSET_DIR_NAME);
131+
$locator->registerStream('assets', '', \UserFrosting\ASSET_DIR_NAME);
132132

133133
$baseUrl = $config['site.uri.public'] . '/' . $config['assets.raw.path'];
134134

0 commit comments

Comments
 (0)