Skip to content

Commit

Permalink
Merge pull request #30 from PyBossa/add-external-js
Browse files Browse the repository at this point in the history
Add documentation.
  • Loading branch information
teleyinex authored Sep 13, 2016
2 parents 90178a0 + b0b08c0 commit e99594c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ options, please check the **--help** command:
pbs update_project --help
```

### Using an external JavaScript file

Since pbs >= 2.3.0, pbs will check for an external JavaScript file named *bundle.js*
or *bundle.min.js*. If any of those files exist, then, they will be added at the bottom
of your template (like you have been doing so far with your projects).

This solution allows you to use for example webpack plus babel to transpile your code,
minimize it and add it to your PYBOSSA project.

In order to use this solution, just transpile to a file named bundle.js or bundle.min.js.

**NOTE** If there's a minified version of the file, bundle.min.js, that file will be always used
instead of bundle.js.

### Auto-updating while developing a PYBOSSA project

At some point you will end up running lots of pbs update_project commands, as
Expand All @@ -201,6 +215,11 @@ And the output will be similar to this:

![GIF of pbs in action](http://i.imgur.com/QoYC4oV.gif)


**NOTE**: this also works with bundle.js files :smile: Thus, you can have webpack
transpiling automatically your code, and pbs will update automatically your project
with the new code.

## Updating tasks redundancy from a project

If you need it, you can update the redundancy of a task using its ID or all the
Expand Down

0 comments on commit e99594c

Please sign in to comment.