Add NPM scripts and update gitignore
parent
05d1c04ab7
commit
64babddd66
|
@ -10,3 +10,10 @@ composer.lock
|
|||
vendor/bin
|
||||
migrations
|
||||
*.sublime-*
|
||||
vendor/
|
||||
public/css/
|
||||
public/js/
|
||||
public/img/
|
||||
public/views/
|
||||
module/
|
||||
node_modules/
|
||||
|
|
|
@ -9,5 +9,8 @@
|
|||
"url": "ssh://gogs@rhea.netlor.fr:2222/monarc/skeleton.git"
|
||||
},
|
||||
"author": "Netlor",
|
||||
"license": "Copyright"
|
||||
"license": "Copyright",
|
||||
"scripts": {
|
||||
"postinstall": "./scripts/link_modules_resources.sh"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -d node_modules/ng_backoffice ]; then
|
||||
pushd node_modules/ng_backoffice
|
||||
grunt compile_translations
|
||||
grunt concat
|
||||
fi
|
||||
|
||||
|
||||
if [ -d node_modules/ng_client ]; then
|
||||
pushd node_modules/ng_client
|
||||
grunt compile_translations
|
||||
grunt concat
|
||||
fi
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -d node_modules/ng_backoffice ]; then
|
||||
pushd node_modules/ng_backoffice
|
||||
grunt extract_translations
|
||||
fi
|
||||
|
||||
|
||||
if [ -d node_modules/ng_client ]; then
|
||||
pushd node_modules/ng_client
|
||||
grunt extract_translations
|
||||
fi
|
|
@ -8,13 +8,29 @@ if [ ! -d public/views ]; then
|
|||
mkdir public/views
|
||||
fi
|
||||
|
||||
if [ ! -d public/img ]; then
|
||||
mkdir public/img
|
||||
fi
|
||||
|
||||
if [ -d node_modules/ng_backoffice ]; then
|
||||
find node_modules/ng_backoffice/views -name "*.html" -exec ln -s $(realpath {}) public/views/ \;
|
||||
find node_modules/ng_backoffice/src -name "*.js" -exec ln -s $(realpath {}) public/js/ \;
|
||||
find node_modules/ng_backoffice/views -name "*.html" -exec ln -s $(realpath {}) public/views/ \; 2>/dev/null
|
||||
find node_modules/ng_backoffice/src -name "*.js" -exec ln -s $(realpath {}) public/js/ \; 2>/dev/null
|
||||
find node_modules/ng_backoffice/css -name "*.css" -exec ln -s $(realpath {}) public/css/ \; 2>/dev/null
|
||||
find node_modules/ng_backoffice/img -name "*" -exec ln -s $(realpath {}) public/img/ \; 2>/dev/null
|
||||
|
||||
pushd node_modules/ng_backoffice
|
||||
grunt concat
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ -d node_modules/ng_client ]; then
|
||||
find node_modules/ng_client/views -name "*.html" -exec ln -s {} public/views/ \;
|
||||
find node_modules/ng_client/src -name "*.js" -exec ln -s {} public/js/ \;
|
||||
find node_modules/ng_client/views -name "*.html" -exec ln -s $(realpath {}) public/views/ \; 2>/dev/null
|
||||
find node_modules/ng_client/src -name "*.js" -exec ln -s $(realpath {}) public/js/ \; 2>/dev/null
|
||||
find node_modules/ng_client/css -name "*.css" -exec ln -s $(realpath {}) public/css/ \; 2>/dev/null
|
||||
find node_modules/ng_client/img -name "*" -exec ln -s $(realpath {}) public/img/ \; 2>/dev/null
|
||||
|
||||
pushd node_modules/ng_backoffice
|
||||
grunt concat
|
||||
popd
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue