Comparing version 2.0.0-beta.0 to 2.0.0-beta.1
{ | ||
"name": "trix", | ||
"version": "2.0.0-beta.0", | ||
"version": "2.0.0-beta.1", | ||
"description": "A rich text editor for everyday writing", | ||
"main": "dist/trix.umd.js", | ||
"module": "dist/trix.js", | ||
"main": "dist/trix.umd.min.js", | ||
"module": "dist/trix.esm.min.js", | ||
"style": "dist/trix.css", | ||
@@ -31,17 +31,19 @@ "files": [ | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^22.0.2", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@web/dev-server": "^0.1.34", | ||
"babel-eslint": "^10.1.0", | ||
"concurrently": "^7.4.0", | ||
"eslint": "^7.32.0", | ||
"esm": "^3.2.25", | ||
"karma": "5.0.2", | ||
"karma-chrome-launcher": "3.1.0", | ||
"karma": "6.4.0", | ||
"karma-chrome-launcher": "3.1.1", | ||
"karma-qunit": "^4.1.2", | ||
"karma-sauce-launcher": "^4.3.6", | ||
"node-sass": "^7.0.1", | ||
"qunit": "2.9.3", | ||
"qunit": "2.19.1", | ||
"rangy": "^1.3.0", | ||
"rollup": "^2.56.3", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-includepaths": "^0.2.4", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
@@ -59,6 +61,9 @@ "svgo": "^2.8.0" | ||
"test": "karma start", | ||
"postversion": "git push && git push --tags", | ||
"release": "yarn test && npm adduser && yarn version && npm publish" | ||
"prerelease": "yarn version && yarn test", | ||
"release": "npm adduser && npm publish", | ||
"postrelease": "git push && git push --tags", | ||
"dev": "web-dev-server --app-index index.html --root-dir dist --node-resolve --open", | ||
"start": "yarn build-assets && concurrently --kill-others --names js,css,dev-server 'yarn watch' 'yarn build-css --watch' 'yarn dev'" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -24,9 +24,11 @@ # Trix | ||
Include the bundled `trix.css` and `trix.js` files in the `<head>` of your page. | ||
Trix comes bundled in ESM and UMD formats and works with any asset packaging system. | ||
The easiest way to start with Trix is including it from an npm CDN in the `<head>` of your page: | ||
```html | ||
<head> | ||
… | ||
<link rel="stylesheet" type="text/css" href="trix.css"> | ||
<script type="text/javascript" src="trix.js"></script> | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/trix@2.0.0-beta.0/dist/trix.css"> | ||
<script type="text/javascript" src="https://unpkg.com/trix@2.0.0-beta.0/dist/trix.umd.min.js"></script> | ||
</head> | ||
@@ -37,4 +39,12 @@ ``` | ||
To use your own polyfills, or to target only browsers that support all of the required standards, include `trix-core.js` instead. | ||
Alternatively, you can install the npm package and import it in your application: | ||
```js | ||
import Trix from "trix" | ||
document.addEventListener("trix-before-initialize", () => { | ||
// Change Trix.config if you need | ||
}) | ||
``` | ||
## Creating an Editor | ||
@@ -346,3 +356,3 @@ | ||
* `trix-before-initialize` fires when the `<trix-editor>` element is attached to the DOM just before Trix installs its `editor` object. | ||
* `trix-before-initialize` fires when the `<trix-editor>` element is attached to the DOM just before Trix installs its `editor` object. If you need to use a custom Trix configuration you can change `Trix.config` here. | ||
@@ -375,3 +385,3 @@ * `trix-initialize` fires when the `<trix-editor>` element is attached to the DOM and its `editor` object is ready for use. | ||
Trix uses [Yarn](https://yarnpkg.com/) to manage dependencies and Rollup[https://rollupjs.org/guide/en/] to bundle its source. | ||
Trix uses [Yarn](https://yarnpkg.com/) to manage dependencies and [Rollup](https://rollupjs.org/guide/en/) to bundle its source. | ||
@@ -398,7 +408,6 @@ Install development dependencies with: | ||
When the watch process is running you can run a web server on the `/dist` directory to serve the compiled assets. For example: | ||
When the watch process is running you can run a web server to serve the compiled assets: | ||
``` | ||
$ cd dist/ | ||
$ python3 -m http.server | ||
$ yarn dev | ||
``` | ||
@@ -408,2 +417,8 @@ | ||
For easier development, you can watch for changes to the JavaScript and style files, and serve the results in a browser, with a single command: | ||
``` | ||
$ yarn start | ||
``` | ||
### Running Tests | ||
@@ -410,0 +425,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
429
2082271
22
47529