fix(build): output aliased cms.js w/ deprecation (#1526)
When loading Netlify CMS via script tag from a CDN, the file was named `cms.js` until 2.0, when it was renamed to `netlify-cms.js` in alignment with all packages outputting files that match the package name. To avoid a lot of broken sites and confusion, this commit outputs both filenames and prints a deprecation warning to the console in `cms.js` only.
This commit is contained in:
@ -45,7 +45,7 @@ CMS.registerWidget(name, control, [preview]);
|
||||
**Example:**
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/netlify-cms@^1.0.0/dist/cms.js"></script>
|
||||
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
|
||||
<script>
|
||||
var CategoriesControl = createClass({
|
||||
handleChange: function(e) {
|
||||
@ -87,7 +87,7 @@ CMS.registerEditorComponent(definition)
|
||||
**Example:**
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/netlify-cms@^1.0.0/dist/cms.js"></script>
|
||||
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
// Internal id of the component
|
||||
|
Reference in New Issue
Block a user