-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/sunnysideup/silverstripe-…
- Loading branch information
Showing
8 changed files
with
333 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
WORKING_DIR=$(pwd) | ||
|
||
|
||
help_and_exit() { | ||
echo " ---------------------------------"; | ||
echo " Available settings:"; | ||
echo " ---------------------------------"; | ||
echo " NONE" | ||
echo " ---------------------------------"; | ||
echo " Example usage:" | ||
echo " ---------------------------------"; | ||
echo " webpack-build themes/my-theme"; | ||
echo " webpack-build vendor/my-vendor/my-package"; | ||
echo " ---------------------------------"; | ||
echo " NB. Make sure to run this from " | ||
echo " the base folder of your project." | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
echo " " | ||
exit; | ||
} | ||
|
||
dir='./' | ||
|
||
while (( $# )); do | ||
case $1 in | ||
-*) printf 'Unknown option: %q\n\n' "$1"; | ||
help_and_exit 1 ;; | ||
*) dir=$1;; | ||
esac | ||
shift | ||
done | ||
|
||
echo " " | ||
echo " " | ||
echo " ---------------------------------"; | ||
echo " Running webpack-build"; | ||
echo " ---------------------------------"; | ||
echo " Directory of script: $SCRIPT_DIR"; | ||
echo " Directory of webpack: $WORKING_DIR/themes/sswebpack_engine_only"; | ||
echo " Directory of project modules: $dir/my_node_modules/ " | ||
echo " Distilled director: $dir/dist" | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
|
||
echo " ---------------------------" | ||
echo " Changing directory to $dir " | ||
echo " ---------------------------" | ||
cd $dir | ||
echo " " | ||
|
||
echo "-----------------------------" | ||
echo "start build" | ||
echo "-----------------------------" | ||
cd themes/sswebpack_engine_only/ | ||
npm run build --theme_dir=$dir --dist_dir=$dir/dist | ||
|
||
|
||
echo " ################################################" | ||
echo " ################################################" | ||
echo " ################################################" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
WORKING_DIR=$(pwd) | ||
|
||
|
||
help_and_exit() { | ||
echo " ---------------------------------"; | ||
echo " Available settings:"; | ||
echo " ---------------------------------"; | ||
echo " NONE" | ||
echo " ---------------------------------"; | ||
echo " Example usage:" | ||
echo " ---------------------------------"; | ||
echo " webpack-dev themes/my-theme"; | ||
echo " webpack-dev vendor/my-vendor/my-package"; | ||
echo " ---------------------------------"; | ||
echo " NB. Make sure to run this from " | ||
echo " the base folder of your project." | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
echo " " | ||
exit; | ||
} | ||
|
||
dir='./' | ||
|
||
while (( $# )); do | ||
case $1 in | ||
-*) printf 'Unknown option: %q\n\n' "$1"; | ||
help_and_exit 1 ;; | ||
*) dir=$1;; | ||
esac | ||
shift | ||
done | ||
|
||
echo " " | ||
echo " " | ||
echo " ---------------------------------"; | ||
echo " Running webpack-dev"; | ||
echo " ---------------------------------"; | ||
echo " Directory of script: $SCRIPT_DIR"; | ||
echo " Directory of webpack: $WORKING_DIR/themes/sswebpack_engine_only"; | ||
echo " Directory of project modules: $dir/my_node_modules/ " | ||
echo " Distilled director: $dir/dist" | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
|
||
echo " ---------------------------" | ||
echo " Changing directory to $dir " | ||
echo " ---------------------------" | ||
cd $dir | ||
echo " " | ||
|
||
echo "-----------------------------" | ||
echo "start dev" | ||
echo "-----------------------------" | ||
cd themes/sswebpack_engine_only/ | ||
npm run dev --theme_dir=$dir --dist_dir=$dir/dist | ||
|
||
|
||
echo " ################################################" | ||
echo " ################################################" | ||
echo " ################################################" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
WORKING_DIR=$(pwd) | ||
|
||
|
||
help_and_exit() { | ||
echo " ---------------------------------"; | ||
echo " Available settings:"; | ||
echo " ---------------------------------"; | ||
echo " NONE" | ||
echo " ---------------------------------"; | ||
echo " Example usage:" | ||
echo " ---------------------------------"; | ||
echo " webpack-install themes/my-theme"; | ||
echo " webpack-install vendor/my-vendor/my-package"; | ||
echo " ---------------------------------"; | ||
echo " NB. Make sure to run this from " | ||
echo " the base folder of your project." | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
echo " " | ||
exit; | ||
} | ||
|
||
dir='./' | ||
|
||
while (( $# )); do | ||
case $1 in | ||
-*) printf 'Unknown option: %q\n\n' "$1"; | ||
help_and_exit 1 ;; | ||
*) dir=$1;; | ||
esac | ||
shift | ||
done | ||
|
||
echo " " | ||
echo " " | ||
echo " ---------------------------------"; | ||
echo " Running install"; | ||
echo " ---------------------------------"; | ||
echo " Directory of script: $SCRIPT_DIR"; | ||
echo " Directory of webpack: $WORKING_DIR/themes/sswebpack_engine_only"; | ||
echo " Directory of project modules: $dir/my_node_modules/ " | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
|
||
echo " ---------------------------" | ||
echo " Changing directory to $dir " | ||
echo " ---------------------------" | ||
cd $dir | ||
echo " " | ||
|
||
cd themes/sswebpack_engine_only/ | ||
npm install | ||
cd - | ||
cd $dir/my_node_modules/ | ||
npm install | ||
cd - | ||
|
||
echo " ################################################" | ||
echo " ################################################" | ||
echo " ################################################" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
WORKING_DIR=$(pwd) | ||
|
||
|
||
help_and_exit() { | ||
echo " ---------------------------------"; | ||
echo " Available settings:"; | ||
echo " ---------------------------------"; | ||
echo " NONE" | ||
echo " ---------------------------------"; | ||
echo " Example usage:" | ||
echo " ---------------------------------"; | ||
echo " webpack-watch themes/my-theme"; | ||
echo " webpack-watch vendor/my-vendor/my-package"; | ||
echo " ---------------------------------"; | ||
echo " NB. Make sure to run this from " | ||
echo " the base folder of your project." | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
echo " " | ||
exit; | ||
} | ||
|
||
dir='./' | ||
|
||
while (( $# )); do | ||
case $1 in | ||
-*) printf 'Unknown option: %q\n\n' "$1"; | ||
help_and_exit 1 ;; | ||
*) dir=$1;; | ||
esac | ||
shift | ||
done | ||
|
||
echo " " | ||
echo " " | ||
echo " ---------------------------------"; | ||
echo " Running webpack-watch"; | ||
echo " ---------------------------------"; | ||
echo " Directory of script: $SCRIPT_DIR"; | ||
echo " Directory of webpack: $WORKING_DIR/themes/sswebpack_engine_only"; | ||
echo " Directory of project modules: $dir/my_node_modules/ " | ||
echo " Distilled director: $dir/dist" | ||
echo " ---------------------------------"; | ||
echo " " | ||
echo " " | ||
|
||
echo " ---------------------------" | ||
echo " Changing directory to $dir " | ||
echo " ---------------------------" | ||
cd $dir | ||
echo " " | ||
|
||
echo "-----------------------------" | ||
echo "start watch" | ||
echo "-----------------------------" | ||
cd themes/sswebpack_engine_only/ | ||
npm run watch --theme_dir=$dir --dist_dir=$dir/dist | ||
|
||
|
||
echo " ################################################" | ||
echo " ################################################" | ||
echo " ################################################" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
{ | ||
"name": "sunnysideup/sswebpack_engine_only", | ||
"type": "silverstripe-theme", | ||
"description": "Webpack engine for Silverstripe without any theme at all. Inspired and HUGE THANK YOU to: andrewhaine/silverstripe-webpack-theme", | ||
"keywords": [ | ||
"Silverstripe-CMS", | ||
"CMS", | ||
"Silverstripe", | ||
"webpack", | ||
"webpack theme", | ||
"silverstripe webpack", | ||
"blank theme", | ||
"front-end framework" | ||
], | ||
"license": "BSD-3-Clause", | ||
"authors": [ | ||
{ | ||
"name": "Nicolaas Francken", | ||
"email": "modules@sunnysideup.co.nz", | ||
"role": "lead developer" | ||
} | ||
], | ||
"require": { | ||
"silverstripe/framework": "~4.0" | ||
}, | ||
"suggest": { | ||
"sunnysideup/webpack_requirements_backend": "Make it work with Silvertripe" | ||
"name": "sunnysideup/sswebpack_engine_only", | ||
"type": "silverstripe-theme", | ||
"description": "Webpack engine for Silverstripe without any theme at all. Inspired and HUGE THANK YOU to: andrewhaine/silverstripe-webpack-theme", | ||
"keywords": [ | ||
"Silverstripe-CMS", | ||
"CMS", | ||
"Silverstripe", | ||
"webpack", | ||
"webpack theme", | ||
"silverstripe webpack", | ||
"blank theme", | ||
"front-end framework" | ||
], | ||
"license": "BSD-3-Clause", | ||
"authors": [ | ||
{ | ||
"name": "Nicolaas Francken", | ||
"email": "modules@sunnysideup.co.nz", | ||
"role": "lead developer" | ||
} | ||
], | ||
"require": { | ||
"silverstripe/framework": "~4.0" | ||
}, | ||
"suggest": { | ||
"sunnysideup/webpack_requirements_backend": "Make it work with Silvertripe" | ||
}, | ||
"bin": [ | ||
"bin/webpack-install", | ||
"bin/webpack-dev", | ||
"bin/webpack-watch", | ||
"bin/webpack-build" | ||
] | ||
} |
Oops, something went wrong.