Change from js to ts
This commit is contained in:
parent
3b757476e0
commit
046e27c737
|
@ -11,7 +11,7 @@ const production = !process.env.ROLLUP_WATCH
|
|||
|
||||
export default [
|
||||
{
|
||||
input: "src/index.js",
|
||||
input: "src/index.ts",
|
||||
output: {
|
||||
sourcemap: !production,
|
||||
format: "cjs",
|
||||
|
|
|
@ -3,7 +3,7 @@ import { create } from "handlebars"
|
|||
import { registerAll, registerMinimum } from "./helpers/index"
|
||||
import { preprocess, postprocess } from "./processors"
|
||||
import { atob, btoa, isBackendService } from "./utilities"
|
||||
import manifest from "../manifest.json"
|
||||
const manifest = require("../manifest.json")
|
||||
import {
|
||||
FIND_HBS_REGEX,
|
||||
FIND_ANY_HBS_REGEX,
|
|
@ -11,12 +11,15 @@ export const PreprocessorNames = {
|
|||
|
||||
/* eslint-disable no-unused-vars */
|
||||
class Preprocessor {
|
||||
private name: string
|
||||
private fn: any
|
||||
|
||||
constructor(name, fn) {
|
||||
this.name = name
|
||||
this.fn = fn
|
||||
}
|
||||
|
||||
process(fullString, statement, opts) {
|
||||
process(fullString: string, statement: string, opts: Object) {
|
||||
const output = this.fn(statement, opts)
|
||||
const idx = fullString.indexOf(statement)
|
||||
return swapStrings(fullString, idx, statement.length, output)
|
Loading…
Reference in New Issue