Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve browser support for website (#1574)
* fix: improve browser support for website * fix(compiler): failing test due to babel config
- Loading branch information
1 parent
9a27745
commit 9df798a
Showing
25 changed files
with
1,789 additions
and
1,516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,5 @@ | ||
"use strict"; | ||
|
||
var nativeRequire = require; | ||
var resolveFrom = require("resolve-from"); | ||
var deresolve = require("deresolve"); | ||
|
||
const deresolveOptions = { | ||
shouldRemoveExt(ext) { | ||
return ext === ".js" || ext === ".json" || ext === ".es6"; | ||
} | ||
}; | ||
|
||
// This allows us to swap out a different implementation in the browser... | ||
// We only need this to make Try Online work :/ | ||
|
||
var helpers = { | ||
require: function(path) { | ||
return nativeRequire(path); | ||
}, | ||
|
||
resolve: function(path) { | ||
return nativeRequire.resolve(path); | ||
}, | ||
|
||
resolveFrom: function(from, target) { | ||
return resolveFrom(from, target); | ||
}, | ||
|
||
deresolve: function(targetFilename, from) { | ||
return deresolve(targetFilename, from, deresolveOptions); | ||
} | ||
}; | ||
|
||
module.exports = helpers; | ||
if (typeof window === "undefined") { | ||
exports.require = require; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/translator-default/src/tag/attribute/directives/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import classPlugin from "./class"; | ||
import stylePlugin from "./style"; | ||
import noUpdatePlugin from "./no-update"; | ||
import noUpdateIfPlugin from "./no-update-if"; | ||
import noUpdateBodyPlugin from "./no-update-body"; | ||
import noUpdateBodyIfPlugin from "./no-update-body-if"; | ||
|
||
export default { | ||
class: classPlugin, | ||
style: stylePlugin, | ||
"no-update": noUpdatePlugin, | ||
"no-update-if": noUpdateIfPlugin, | ||
"no-update-body": noUpdateBodyPlugin, | ||
"no-update-body-if": noUpdateBodyIfPlugin | ||
}; |
Oops, something went wrong.