Merge branch 'rerun' into 'master'
Update readme and add auto reload golang server See merge request !5
This commit is contained in:
commit
fb4dcdc8fd
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
static
|
||||
node_modules
|
||||
tmp
|
||||
|
32
README.md
32
README.md
@ -25,15 +25,45 @@ make test
|
||||
make clean
|
||||
```
|
||||
|
||||
## Debian user
|
||||
|
||||
If you use debian the node binary is named nodejs you have to symlink it to node:
|
||||
|
||||
```
|
||||
# ln -s /usr/bin/nodejs /usr/bin/node
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
Install npm depedencies
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
Then run build
|
||||
|
||||
```
|
||||
npm run build
|
||||
|
||||
```
|
||||
|
||||
## Watch
|
||||
## Watch js and less update
|
||||
|
||||
```
|
||||
npm run watch
|
||||
```
|
||||
|
||||
## Auto reload web server
|
||||
|
||||
First install fresh
|
||||
|
||||
```
|
||||
go get github.com/pilu/fresh
|
||||
```
|
||||
|
||||
Then run it
|
||||
|
||||
```
|
||||
fresh -c fresh.conf
|
||||
```
|
||||
|
3
fresh.conf
Normal file
3
fresh.conf
Normal file
@ -0,0 +1,3 @@
|
||||
ignored: node_modules,src,static
|
||||
build_name: dev-build
|
||||
build_log: dev-build.log
|
10
package.json
10
package.json
@ -4,11 +4,11 @@
|
||||
"description": "``` make dev ```",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build-js": "mkdir -p ./static/js & nodejs node_modules/.bin/browserify src/js/app.js -o static/js/app.js",
|
||||
"build-less": "mkdir -p ./static/css & nodejs ./node_modules/.bin/lessc --include-path=./node_modules src/less/app.less static/css/app.css",
|
||||
"build-font": "mkdir ./static & nodejs ./node_modules/.bin/fontify",
|
||||
"watch-js": "nodejs ./node_modules/.bin/nodemon -e js -w src/js/app.js -x 'npm run build-js'",
|
||||
"watch-less": "nodejs ./node_modules/.bin/nodemon -e less -w src/less/app.less -x 'npm run build-less'",
|
||||
"build-js": "mkdir -p ./static/js & node node_modules/.bin/browserify src/js/app.js -o static/js/app.js",
|
||||
"build-less": "mkdir -p ./static/css & node ./node_modules/.bin/lessc --include-path=./node_modules src/less/app.less static/css/app.css",
|
||||
"build-font": "mkdir ./static & node ./node_modules/.bin/fontify",
|
||||
"watch-js": "node ./node_modules/.bin/nodemon -e js -w src/js/app.js -x 'npm run build-js'",
|
||||
"watch-less": "node ./node_modules/.bin/nodemon -e less -w src/less/app.less -x 'npm run build-less'",
|
||||
"build": "npm run build-js & npm run build-less & npm run build-font",
|
||||
"watch": "npm run watch-js & npm run watch-less"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user