add install script
This commit is contained in:
parent
13f62dcf8e
commit
04ef067baf
23
packages/install/install.sh
Executable file
23
packages/install/install.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "Please provide project name"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
CWD=$PWD
|
||||||
|
WORK_DIR=`mktemp -d`
|
||||||
|
|
||||||
|
echo 'Creating a sandbox with the CLI and Nx Schematics...'
|
||||||
|
touch $WORK_DIR/package.json
|
||||||
|
echo '{"dependencies": {"@angular/cli": "nrwl/fix-cli-build", "@nrwl/schematics": "github:nrwl/schematics-build"}}' > $WORK_DIR/package.json
|
||||||
|
|
||||||
|
cd $WORK_DIR
|
||||||
|
npm install --silent
|
||||||
|
|
||||||
|
echo 'Creating a new project...'
|
||||||
|
cd $CWD
|
||||||
|
$WORK_DIR/node_modules/.bin/ng new $1 --collection=@nrwl/schematics
|
||||||
|
|
||||||
|
rm -rf $WORK_DIR
|
||||||
Loading…
x
Reference in New Issue
Block a user