You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.5 KiB

= Bundling an npm version of {productname} with CommonJS and Browserify
:navtitle: CommonJS and npm
:description_short: Bundling an npm version of TinyMCE in a project using CommonJS and Browserify
:description: Bundling an npm version of TinyMCE in a project using CommonJS and Browserify
:keywords: browserify, commonjs, cjs, npm, modules, tinymce
:installtype: an npm
:bundler: https://browserify.org/[Browserify]
:syntax: http://www.commonjs.org/specs/modules/1.0/[CommonJS syntax]
include::partial$module-loading/bundling-procedure-intro.adoc[]
== Requirements
This guide requires the following:
* Node.js and npm
* Basic knowledge of how to use https://browserify.org/[Browserify]
* (Optional: For premium features) The latest premium `+.zip+` bundle of {productname} for including premium plugins
== Procedure
:is_zip_install: false
include::partial$module-loading/browserify-dev-dependencies.adoc[]
include::partial$module-loading/bundling-browserify-cjs-npm_editor.adoc[]
include::partial$module-loading/bundling-browserify-cjs-main.adoc[]
. Run Browserify to test the bundle, such as:
+
[source,sh]
----
browserify -t brfs -g browserify-css src/main.js -o dist/main.bundle.js
----
+
If Browserify runs successfully, check that the editor loads in the application. If Browserify fails, review any errors and review the configuration changes in this procedure; you may need to adjust for conflicts or other issues when bundling {productname} into an existing project.
:!is_zip_install:
include::partial$module-loading/bundling-next-steps.adoc[]