File tree 5 files changed +41
-15
lines changed
5 files changed +41
-15
lines changed Original file line number Diff line number Diff line change
1
+ sudo : false
2
+ language : node_js
3
+ node_js :
4
+ - ' 4'
5
+ - ' 6'
6
+ - ' 9'
Original file line number Diff line number Diff line change 2
2
3
3
A helper to (re-)build [ nodeenv] ( https://github.com/ekalinin/nodeenv ) .
4
4
5
- ## install:
5
+ ## Usage
6
6
7
- npm install build-node-venv --save-dev
7
+ First, install the package using npm:
8
8
9
- Add ` env ` to ` scripts ` in your ` package.json ` for quick rebuilds:
9
+ npm install build-nodeenv --save-dev
10
10
11
- ```
12
- "scripts": {
13
- "env": "build-node-venv && # npm install && npm update"
14
- }
15
- ```
11
+ Then you can use it as a CLI to rebuild your module:
16
12
17
- > Note that you will need to have [ virtualenv ] ( https://pypi.python.org/pypi/virtualenv ) installed.
13
+ build-nodeenv
18
14
15
+ You can also add it to you package.json like so:
16
+
17
+ "scripts": {
18
+ "env": "build-nodeenv"
19
+ }
20
+
21
+ ## No Node
22
+
23
+ In case you have no Node running outside your virtual environment, you can download and run the build script like so:
24
+
25
+ curl https://raw.githubusercontent.com/ESCPP/build-node-venv/master/build-node-venv.sh > ./build-node-venv.sh && chmod +x ./build-node-venv.sh && ./build-node-venv.sh
26
+
27
+ This will create the virtual environment so you will be able to reset from here as normal.
28
+
29
+ > Note that you will need [ virtualenv] ( https://pypi.python.org/pypi/virtualenv ) installed.
30
+
31
+ ## License
32
+
33
+ MIT
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ if [ -e "./.venv" ] ; then
12
12
rm -rf " ./.venv" && deactivate
13
13
fi
14
14
15
+ # clear node_modules if there
16
+ if [ -e " ./node_modules" ] ; then
17
+ rm -rf " ./node_modules"
18
+ fi
19
+
15
20
# create node env
16
21
virtualenv .venv && source .venv/bin/activate
17
22
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # https://github.com/ES-CPP/bashnips
3
2
4
3
# current folder
5
4
cd " ${0%/* } "
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " build-node-venv" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.2 " ,
4
4
"description" : " Bash helper to re-build node-venv" ,
5
5
"main" : " build-node-venv.sh" ,
6
6
"bin" : {
7
7
"build-node-venv" : " build-parent-node-venv.sh"
8
8
},
9
9
"scripts" : {
10
- "env" : " chmod +x ./build-node-venv.sh && ./build-node-venv.sh"
10
+ "env" :" curl https://raw.githubusercontent.com/ESCPP/build-node-venv/master/build-node-venv.sh > ./build-node-venv.sh && chmod +x ./build-node-venv.sh && ./build-node-venv.sh" ,
11
+ "test" : " cd test && npm install && build-node-venv"
11
12
},
12
13
"repository" : {
13
14
"type" : " git" ,
14
- "url" : " git+https://github.com/GitBruno /build-node-venv.git"
15
+ "url" : " git+https://github.com/ESCPP /build-node-venv.git"
15
16
},
16
17
"keywords" : [
17
18
" nodeenv" ,
22
23
"author" : " Bruno Herfst" ,
23
24
"license" : " MIT" ,
24
25
"bugs" : {
25
- "url" : " https://github.com/GitBruno /build-node-venv/issues"
26
+ "url" : " https://github.com/ESCPP /build-node-venv/issues"
26
27
},
27
- "homepage" : " https://github.com/GitBruno /build-node-venv"
28
+ "homepage" : " https://github.com/ESCPP /build-node-venv"
28
29
}
You can’t perform that action at this time.
0 commit comments