-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce1f2ab
commit dc73290
Showing
40 changed files
with
218 additions
and
163 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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { isArray } from '../utils.js'; | ||
|
||
/* istanbul ignore if: tested but not covered in istanbul due to dist build */ | ||
const SourceNode = function (line, column, srcFile, chunks) { | ||
this.src = ''; | ||
if (chunks) { | ||
this.add(chunks); | ||
} | ||
}; | ||
/* istanbul ignore next */ | ||
SourceNode.prototype = { | ||
add: function (chunks) { | ||
if (isArray(chunks)) { | ||
chunks = chunks.join(''); | ||
} | ||
this.src += chunks; | ||
}, | ||
prepend: function (chunks) { | ||
if (isArray(chunks)) { | ||
chunks = chunks.join(''); | ||
} | ||
this.src = chunks + this.src; | ||
}, | ||
toStringWithSourceMap: function () { | ||
return { code: this.toString() }; | ||
}, | ||
toString: function () { | ||
return this.src; | ||
}, | ||
}; | ||
|
||
export { SourceNode }; |
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
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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* eslint-env node */ | ||
module.exports = require('../dist/cjs/index.js').default; |
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,26 +1,7 @@ | ||
// USAGE: | ||
// var handlebars = require('handlebars'); | ||
/* eslint-env node */ | ||
/* eslint-disable no-var */ | ||
import handlebars from './handlebars/index.js'; | ||
import { PrintVisitor, print } from '@handlebars/parser'; | ||
|
||
// var local = handlebars.create(); | ||
handlebars.PrintVisitor = PrintVisitor; | ||
handlebars.print = print; | ||
|
||
var handlebars = require('../dist/cjs/handlebars')['default']; | ||
|
||
var parser = require('@handlebars/parser'); | ||
handlebars.PrintVisitor = parser.PrintVisitor; | ||
handlebars.print = parser.print; | ||
|
||
module.exports = handlebars; | ||
|
||
// Publish a Node.js require() handler for .handlebars and .hbs files | ||
function extension(module, filename) { | ||
var fs = require('fs'); | ||
var templateString = fs.readFileSync(filename, 'utf8'); | ||
module.exports = handlebars.compile(templateString); | ||
} | ||
/* istanbul ignore else */ | ||
if (typeof require !== 'undefined' && require.extensions) { | ||
require.extensions['.handlebars'] = extension; | ||
require.extensions['.hbs'] = extension; | ||
} | ||
export default handlebars; |
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,2 @@ | ||
/* eslint-env node */ | ||
module.exports = require('../dist/cjs/handlebars/index.runtime.js').default; |
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,9 @@ | ||
{ | ||
"type": "module", | ||
"imports": { | ||
"#source-map": { | ||
"node": "source-map", | ||
"default": "./handlebars/compiler/source-map.js" | ||
} | ||
} | ||
} |
Oops, something went wrong.