Comparing version 1.5.16 to 1.5.17
@@ -53,2 +53,3 @@ var __create = Object.create; | ||
defaultMode = "auto", | ||
service = false, | ||
typescript, | ||
@@ -71,3 +72,4 @@ destination, | ||
mode, | ||
typescript | ||
typescript, | ||
service | ||
}, path.default.resolve(filepath), readFile, activateCallbackFunction, () => { | ||
@@ -74,0 +76,0 @@ }, format, _writeFile || ((name, content) => writeFile(name, content, destination, filepath)), defaultMode); |
@@ -0,17 +1,19 @@ | ||
const util = require("util"); | ||
const fs = require("fs"); | ||
const {AtBuild} = require("../atbuild"); | ||
const readFile = util.promisify(fs.readFile); | ||
async function onLoad(args) { | ||
let source = await readFile(args.path, "utf8"); | ||
let contents = AtBuild.transformAST(AtBuild.buildAST(source, args.path), source); | ||
source = null; | ||
return { | ||
contents | ||
}; | ||
} | ||
const filter = {filter: /\.(@js|jsb|tsb|@ts)$/}; | ||
module.exports = { | ||
name: "AtBuildFull", | ||
setup(build) { | ||
const util = require("util"); | ||
const fs = require("fs"); | ||
const {AtBuild} = require("../atbuild"); | ||
const readFile = util.promisify(fs.readFile); | ||
build.onLoad({filter: /\.(@js|jsb|tsb|@ts)$/}, async (args) => { | ||
let source = await readFile(args.path, "utf8"); | ||
let contents = AtBuild.transformAST(AtBuild.buildAST(source, args.path), source); | ||
source = null; | ||
return { | ||
contents | ||
}; | ||
}); | ||
build.onLoad(filter, onLoad); | ||
} | ||
}; |
@@ -0,17 +1,19 @@ | ||
const util = require("util"); | ||
const fs = require("fs"); | ||
const {buildAST, transformAST} = require("../light"); | ||
const readFile = util.promisify(fs.readFile); | ||
const filter = {filter: /\.(atbuild)$/}; | ||
async function onLoad(args) { | ||
let source = await readFile(args.path, "utf8"); | ||
let contents = transformAST(buildAST(source)); | ||
source = null; | ||
return { | ||
contents: `module.exports.default = ${contents}` | ||
}; | ||
} | ||
module.exports = { | ||
name: "AtBuildLight", | ||
setup(build) { | ||
const util = require("util"); | ||
const fs = require("fs"); | ||
const {buildAST, transformAST} = require("../light"); | ||
const readFile = util.promisify(fs.readFile); | ||
build.onLoad({filter: /\.(atbuild)$/}, async (args) => { | ||
let source = await readFile(args.path, "utf8"); | ||
let contents = transformAST(buildAST(source)); | ||
source = null; | ||
return { | ||
contents: `module.exports.default = ${contents}` | ||
}; | ||
}); | ||
build.onLoad(filter, onLoad); | ||
} | ||
}; |
{ | ||
"name": "atbuild", | ||
"version": "1.5.16", | ||
"version": "1.5.17", | ||
"main": "dist/atbuild.js", | ||
@@ -5,0 +5,0 @@ "browser": "web/atbuild.js", |
@@ -378,2 +378,4 @@ # AtBuild – Experimental JavaScript Preprocessor | ||
**November 9th**: Bump to latest esbuild with plugin API. | ||
**November 6th**: New syntax for Atbuild Full, and a new parser to go with it. | ||
@@ -380,0 +382,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
342087
4118
493