Skip to content

Commit 4feaf1c

Browse files
Replace Makefile with npm build script
1 parent cb8129e commit 4feaf1c

5 files changed

Lines changed: 7 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.idea
12
.DS_Store
23
node_modules/

Makefile

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ git clone --recursive git://github.com/MrRio/jsPDF.git
2727

2828
## Building
2929

30-
To build, simply run the 'make' command. This will fetch all npm and bower deps, then compile minified JS files.
30+
To build, simply run `npm run build`. This will fetch all npm and bower deps, then compile minified JS files.
3131

3232
## Running locally
3333

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ cat ${files} ${libs} \
4444
| sed s/\${versionID}/${version}-git\ Built\ on\ ${build}/ \
4545
| sed s/\${commitID}/${commit}/ \
4646
| sed "s/\"1\.0\.0-trunk\"/\"${version}-debug ${build}:${whoami}\"/" > "$(echo $output | sed s/min/debug/)"
47-
uglifyjs ${options} -o ${output} ${files} ${libs}
47+
./node_modules/.bin/uglifyjs ${options} -o ${output} ${files} ${libs}
4848

4949
# Pretend license information to minimized file
5050
for fn in ${files} ${libs}; do

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
},
1919
"dependencies": {},
2020
"devDependencies": {
21-
"local-web-server": "^0.5.19"
21+
"local-web-server": "^0.5.19",
22+
"uglify-js": "^2.6.2"
2223
},
2324
"scripts": {
24-
"start": "ws"
25+
"start": "ws",
26+
"build": "npm install && bower install && ./build.sh"
2527
}
2628
}

0 commit comments

Comments
 (0)