Skip to content
Provides an API for easily transforming Delphi Forms
TypeScript Nearley Pascal JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github
__test__/__fixtures__
packages
release
.eslintrc.js
.gitattributes
.gitignore
LICENSE
README.md
commitlint.config.js
eslint.config.js
greenkeeper.json
jest.config.js
package.json
release.config.js
tsconfig.json
typedoc.js
yarn.lock

README.md

postdfm

Process over Delphi Forms (.dfm) files via an AST.

Inspired by the excellent PostCSS tool, motivated by my rage at the Delphi IDE.

CircleCI branch Codecov branch Greenkeeper

Table of Contents

Packages

Package Version
postdfm npm
@postdfm/ast npm
@postdfm/ast2dfm npm
@postdfm/dfm2ast npm

Installation

The postdfm project is an interface wrapping all the separate modules together.

# npm
$ npm install postdfm

# yarn
$ yarn add postdfm

Example Usage

const fs = require("fs");
const postdfm = require("postdfm");

const cisDfm = fs.readFileSync(
  "cis.dfm",
  //.dfm files tend to be ascii instead of utf8
  "ascii"
);

const runner = postcss({
  transformers: [
    function(ast) {
      //transform and return the ast
      return transformedAst;
    }
  ]
});

const transDfm = runner.processSync(dfm, {
  //filename used for reporting errors
  from: "cis.dfm"
});

fs.writeFileSync("trans.dfm", transDfm);

See the postdfm package for more information.

Contributing

Bug reports and feature requests are greatly appreciated, as are pull requests.

Please see the Contributing Guide for instructions on how to contribute to this project.

License

Licensed under the MIT License.

You can’t perform that action at this time.