Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
57925465
Commit
57925465
authored
Jan 18, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests_path constant and added tests to bundle publisher.
parent
ba1d2a62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
laravel/cli/tasks/bundle/publisher.php
+7
-4
paths.php
+7
-2
No files found.
laravel/cli/tasks/bundle/publisher.php
View file @
57925465
...
@@ -14,20 +14,23 @@ class Publisher {
...
@@ -14,20 +14,23 @@ class Publisher {
*/
*/
public
function
publish
(
$bundle
)
public
function
publish
(
$bundle
)
{
{
$
this
->
move
(
$bundle
,
$this
->
from
(
$bundle
),
$this
->
to
(
$bundle
)
);
$
path
=
Bundle
::
path
(
$bundle
);
echo
"Assets published for bundle [
$bundle
]."
.
PHP_EOL
;
$this
->
move
(
$path
.
'public'
,
PUBLIC_PATH
.
'bundles'
.
DS
.
$bundle
);
$this
->
move
(
$path
.
'tests'
,
TESTS_PATH
.
'cases'
.
DS
.
'bundles'
.
DS
.
$bundle
);
echo
"Assets and tests published for bundle [
$bundle
]."
.
PHP_EOL
;
}
}
/**
/**
* Copy the contents of a bundle's assets to the public folder.
* Copy the contents of a bundle's assets to the public folder.
*
*
* @param string $bundle
* @param string $source
* @param string $source
* @param string $destination
* @param string $destination
* @return void
* @return void
*/
*/
protected
function
move
(
$
bundle
,
$
source
,
$destination
)
protected
function
move
(
$source
,
$destination
)
{
{
File
::
copy_dir
(
$source
,
$destination
);
File
::
copy_dir
(
$source
,
$destination
);
}
}
...
...
paths.php
View file @
57925465
...
@@ -24,6 +24,11 @@ define('DS', DIRECTORY_SEPARATOR);
...
@@ -24,6 +24,11 @@ define('DS', DIRECTORY_SEPARATOR);
$paths
[
'APP_PATH'
]
=
'application'
;
$paths
[
'APP_PATH'
]
=
'application'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the Laravel directory.
// --------------------------------------------------------------
$paths
[
'SYS_PATH'
]
=
'laravel'
;
// --------------------------------------------------------------
// The path to the bundles directory.
// The path to the bundles directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
$paths
[
'BUNDLE_PATH'
]
=
'bundles'
;
$paths
[
'BUNDLE_PATH'
]
=
'bundles'
;
...
@@ -34,9 +39,9 @@ $paths['BUNDLE_PATH'] = 'bundles';
...
@@ -34,9 +39,9 @@ $paths['BUNDLE_PATH'] = 'bundles';
$paths
[
'STORAGE_PATH'
]
=
'storage'
;
$paths
[
'STORAGE_PATH'
]
=
'storage'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the
Laravel
directory.
// The path to the
tests
directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
$paths
[
'
SYS_PATH'
]
=
'laravel
'
;
$paths
[
'
TESTS_PATH'
]
=
'tests
'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the public directory.
// The path to the public directory.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment