Skip to content
This repository
tree: 82d3a0eac0
Fetching contributors…

Cannot retrieve contributors at this time

file 98 lines (90 sloc) 2.636 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
VERSION = $(shell cat version.txt)

JS_OUTPUT = "dist/wysihtml5-${VERSION}.js"

OPEN = $(shell which xdg-open || which gnome-open || which open)

JS_FILES = src/wysihtml5.js \
  lib/rangy/rangy-core.js \
  lib/base/base.js \
  src/browser.js \
  src/lang/array.js \
  src/lang/dispatcher.js \
  src/lang/object.js \
  src/lang/string.js \
  src/dom/auto_link.js \
  src/dom/class.js \
  src/dom/contains.js \
  src/dom/convert_to_list.js \
  src/dom/copy_attributes.js \
  src/dom/copy_styles.js \
  src/dom/delegate.js \
  src/dom/get_as_dom.js \
  src/dom/get_parent_element.js \
  src/dom/get_style.js \
  src/dom/has_element_with_tag_name.js \
  src/dom/has_element_with_class_name.js \
  src/dom/insert.js \
  src/dom/insert_css.js \
  src/dom/observe.js \
  src/dom/parse.js \
  src/dom/remove_empty_text_nodes.js \
  src/dom/rename_element.js \
  src/dom/replace_with_child_nodes.js \
  src/dom/resolve_list.js \
  src/dom/sandbox.js \
  src/dom/set_attributes.js \
  src/dom/set_styles.js \
  src/dom/simulate_placeholder.js \
  src/dom/text_content.js \
  src/quirks/clean_pasted_html.js \
  src/quirks/ensure_proper_clearing.js \
  src/quirks/get_correct_inner_html.js \
  src/quirks/insert_line_break_on_return.js \
  src/quirks/redraw.js \
  src/selection/selection.js \
  src/selection/html_applier.js \
  src/commands.js \
  src/commands/bold.js \
  src/commands/createLink.js \
  src/commands/fontSize.js \
  src/commands/foreColor.js \
  src/commands/formatBlock.js \
  src/commands/formatInline.js \
  src/commands/insertHTML.js \
  src/commands/insertImage.js \
  src/commands/insertLineBreak.js \
  src/commands/insertOrderedList.js \
  src/commands/insertUnorderedList.js \
  src/commands/italic.js \
  src/commands/justifyCenter.js \
  src/commands/justifyLeft.js \
  src/commands/justifyRight.js \
  src/commands/justifyFull.js \
  src/commands/redo.js \
  src/commands/underline.js \
  src/commands/undo.js \
  src/undo_manager.js \
  src/views/view.js \
  src/views/composer.js \
  src/views/composer.style.js \
  src/views/composer.observe.js \
  src/views/synchronizer.js \
  src/views/textarea.js \
  src/toolbar/dialog.js \
  src/toolbar/speech.js \
  src/toolbar/toolbar.js \
  src/editor.js

all: bundle minify

bundle:
@@echo "Bundling..."
@@touch ${JS_OUTPUT}
@@rm ${JS_OUTPUT}
@@cat ${JS_FILES} >> ${JS_OUTPUT}
@@cat ${JS_OUTPUT} | sed "s/@VERSION/${VERSION}/" > "${JS_OUTPUT}.tmp"
@@mv "${JS_OUTPUT}.tmp" ${JS_OUTPUT}

minify:
@@echo "Minifying... (this requires node.js)"
@@node build/minify.js ${JS_OUTPUT}
@@echo "Done."

unittest:
@@${OPEN} test/index.html

clean:
@@git co ${JS_OUTPUT}
Something went wrong with that request. Please try again.