Permalink
Browse files

Now it's easy to make builds (including release builds) with browserify

  • Loading branch information...
balping committed Jun 6, 2016
1 parent 9ef736e commit 422e929108849c25a07965c56afbd4f6e530f459
Showing with 1,127 additions and 811 deletions.
  1. +1 −1 .gitignore
  2. +41 −0 README.md
  3. +13 −0 build.sh
  4. +1,052 −0 dist/vue-table.js
  5. +1 −0 dist/vue-table.min.js
  6. +1 −1 examples/bootstrap.html
  7. +1 −1 examples/semantic.html
  8. +12 −2 package.json
  9. +5 −806 src/vue-table.js
View
@@ -1,2 +1,2 @@
.DS_Store
node_modules
View
@@ -192,6 +192,47 @@ section for more detail.
For more detail, please see [documentation in the Wiki pages](https://github.com/ratiw/vue-table/wiki).
### Building
Run `npm install`
Then make sure, you have installed browserify:
```
# npm install browserify -g
```
You might need root access for running the above command.
Then you can simply run the build script included in the root folder:
```
$ ./build.sh
```
This will compile the vue components in the `src` directory to one file in the `dist` folder.
You might want to get a minified version, in this case run this:
```
$ ./build.sh production
```
For developement it's useful when it's not needed to recompile manually each time you make a change. If you want this convenience first install watchify globally:
```
# npm install watchify -g
```
then run
```
$ ./build.sh watch
```
Now each time you make a change, the source will be recompiled automatically.
<a id="license"></a>
## License
View
@@ -0,0 +1,13 @@
#!/bin/bash
if [[ "$1" == "production" ]]; then
export NODE_ENV=production
browserify -x vue -x vue-resource src/vue-table.js \
| node_modules/uglify-js/bin/uglifyjs -c --screw-ie8 > dist/vue-table.min.js
elif [[ "$1" == "watch" ]]; then
watchify -x vue -x vue-resource src/vue-table.js -o dist/vue-table.js
else
browserify -x vue -x vue-resource src/vue-table.js -o dist/vue-table.js
fi
Oops, something went wrong.

0 comments on commit 422e929

Please sign in to comment.