mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Deprecate some tags, and add notes for future deprecations (#1258)
This commit is contained in:
parent
cdb60996d5
commit
c7c32a900c
@ -1,3 +1,5 @@
|
||||
// TODO: Should deprecate and move into marko/cli
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
var fs = require("fs");
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// TODO: Should deprecate and extract into @marko/browser-refresh
|
||||
|
||||
var isDebug = require("./env").isDebug;
|
||||
|
||||
if (isDebug) {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// TODO: Should deprecate and extract into @marko/express
|
||||
|
||||
var isDebug = require("./env").isDebug;
|
||||
var target = isDebug ? "marko/src/express" : "marko/dist/express";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// TODO: deprecate this (and empty).
|
||||
module.exports = function notEmpty(o) {
|
||||
if (o == null) {
|
||||
return false;
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// TODO: Should deprecate?
|
||||
|
||||
var isDebug = require("./env").isDebug;
|
||||
|
||||
if (isDebug) {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<module-code(function(require) {
|
||||
require("complain")("marko/jquery is deprecated.");
|
||||
var isDebug = require('./env').isDebug;
|
||||
return `module.exports = require("./${isDebug ? 'src' : 'dist'}/components/jquery");\n`;
|
||||
})/>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// TODO: Should deprecate and extract into @marko/register
|
||||
var isDebug = require("./env").isDebug;
|
||||
|
||||
if (isDebug) {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<module-code(function(require) {
|
||||
require("complain")("marko/ready is deprecated.");
|
||||
var isDebug = require('./env').isDebug;
|
||||
return `module.exports = require("./${isDebug ? 'src' : 'dist'}/components/ready");\n`;
|
||||
})/>
|
||||
|
||||
@ -163,6 +163,8 @@ class Parser {
|
||||
}
|
||||
|
||||
if (tagName === "marko-compiler-options") {
|
||||
context.deprecate("<marko-compiler-options> is deprecated.");
|
||||
|
||||
this.parentNode.setTrimStartEnd(true);
|
||||
|
||||
attributes.forEach(function(attr) {
|
||||
|
||||
1
src/taglibs/cache/marko.json
vendored
1
src/taglibs/cache/marko.json
vendored
@ -1,5 +1,6 @@
|
||||
{
|
||||
"<cached-fragment>": {
|
||||
"deprecated": true,
|
||||
"renderer": "./cached-fragment-tag",
|
||||
"@cache-key": "string",
|
||||
"@cache-name": "string",
|
||||
|
||||
@ -111,11 +111,13 @@
|
||||
"no-output": true
|
||||
},
|
||||
"<marko>": {
|
||||
"deprecated": true,
|
||||
"code-generator": "./marko-tag",
|
||||
"open-tag-only": true,
|
||||
"@no-browser-rerender": "boolean"
|
||||
},
|
||||
"<marko-preserve-whitespace>": {
|
||||
"deprecated": true,
|
||||
"code-generator": "./marko-preserve-whitespace-tag",
|
||||
"preserve-whitespace": true,
|
||||
"autocomplete": [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user