Skip to content

Commit

Permalink
Update PublicLab.Editor.js to remove jQuery, bump version to 1.0.0 (#110
Browse files Browse the repository at this point in the history
)

* Update PublicLab.Editor.js

* built

* Update index.html

* externalized jquery and jquery plugins

* adding node versions

* bump node 4 to 4.2

* deprecating node v4

* updated examples and removed Bootstrap too

* added Bootstrap to Gruntfile
  • Loading branch information
jywarren authored Dec 15, 2017
1 parent f40e594 commit 8d23c2d
Show file tree
Hide file tree
Showing 16 changed files with 4,863 additions and 21,064 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: node_js
node_js:
- '4'
- '5'
- '6'
- '7'
before_install:
- npm install -g grunt-cli
script: grunt jasmine
7 changes: 7 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ module.exports = function(grunt) {
specs: 'spec/javascripts/*spec.js',
vendor: [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/bootstrap/dist/js/bootstrap.min.js',
'node_modules/blueimp-file-upload/js/vendor/jquery.ui.widget.js',
'node_modules/blueimp-file-upload/js/jquery.iframe-transport.js',
'node_modules/blueimp-file-upload/js/jquery.fileupload.js',
'node_modules/typeahead.js/dist/typeahead.jquery.js',
'node_modules/typeahead.js/dist/bloodhound.js',
'node_modules/bootstrap-tokenfield/dist/bootstrap-tokenfield.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'node_modules/jasmine-ajax/lib/mock-ajax.js'
]
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,26 @@ To customize the @author and #tag autocompletes with your own suggestions, or wi

The editor toolbar comes in two differnt formats. You can use a smaller version by using a `size` property in the constructor. Refer to example given in `/examples/comment.html`

## Dependencies

As of `v1`, `PublicLab.Editor` requires `jQuery` to be included on the page, and some external `jQuery` plugins for the `TagsModule` and `MainImageModule`:

```html
<script src="../node_modules/jquery/dist/jquery.min.js"></script>

<!-- required for TagsModule -->
<script src="../node_modules/typeahead.js/dist/typeahead.jquery.js"></script>
<script src="../node_modules/typeahead.js/dist/bloodhound.js"></script>
<script src="../node_modules/bootstrap-tokenfield/dist/bootstrap-tokenfield.js"></script>

<!-- required for MainImageModule -->
<script src="../node_modules/blueimp-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="../node_modules/blueimp-file-upload/js/jquery.iframe-transport.js"></script>
<script src="../node_modules/blueimp-file-upload/js/jquery.fileupload.js"></script>
```

These used to be compiled into `PublicLab.Editor` but are now external so that `jQuery` does not get included twice when using the editor in a page which already has `jQuery.


## Server

Expand Down Expand Up @@ -223,3 +243,9 @@ var editor = new PL.Editor({
The TitleModule can make requests to find "related" content and suggest it be attached. Documentation on this can be found at:

https://github.com/publiclab/PublicLab.Editor/blob/master/src/modules/PublicLab.TitleModule.Related.js

****

### Compatibility

PublicLab.Editor uses jQuery 1.7+ or 2, and tests run on Node v5+. Other versions depended on are noted in the package.json file.
Loading

0 comments on commit 8d23c2d

Please sign in to comment.