Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
judit-nahaj committed Sep 25, 2017
1 parent e3bccd2 commit 712e6f0
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

### Added

- Add code to apply preprocessing rules to Gherkin feature files ([#1](https://github.com/judit-nahaj/gherkin-preprocessor/issues/1))
- Add predefined preprocessors: replacer ([#2](https://github.com/judit-nahaj/gherkin-preprocessor/issues/2))
- Add code to apply preprocessing rules to Gherkin feature files ([#1](https://github.com/judit-nahaj/gherkin-precompiler/issues/1))
- Add predefined preprocessors: replacer ([#2](https://github.com/judit-nahaj/gherkin-precompiler/issues/2))
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gherkin-preprocessor
# gherkin-precompiler

[![Build Status](https://travis-ci.org/judit-nahaj/gherkin-preprocessor.svg?branch=master)](https://travis-ci.org/judit-nahaj/gherkin-preprocessor) [![dependency Status](https://david-dm.org/judit-nahaj/gherkin-preprocessor.svg)](https://david-dm.org/judit-nahaj/gherkin-preprocessor) [![devDependency Status](https://david-dm.org/judit-nahaj/gherkin-preprocessor/dev-status.svg)](https://david-dm.org/judit-nahaj/gherkin-preprocessor#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/github/judit-nahaj/gherkin-preprocessor/badge.svg?branch=master)](https://coveralls.io/github/judit-nahaj/gherkin-preprocessor?branch=master)
[![Build Status](https://travis-ci.org/judit-nahaj/gherkin-precompiler.svg?branch=master)](https://travis-ci.org/judit-nahaj/gherkin-precompiler) [![dependency Status](https://david-dm.org/judit-nahaj/gherkin-precompiler.svg)](https://david-dm.org/judit-nahaj/gherkin-precompiler) [![devDependency Status](https://david-dm.org/judit-nahaj/gherkin-precompiler/dev-status.svg)](https://david-dm.org/judit-nahaj/gherkin-precompiler#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/github/judit-nahaj/gherkin-precompiler/badge.svg?branch=master)](https://coveralls.io/github/judit-nahaj/gherkin-precompiler?branch=master)

Simple pre-processor for Gherkin feature files.

Expand All @@ -10,7 +10,7 @@ It is based on the AST what is provided by [gherkin-assembler](https://www.npmjs

```javascript
'use strict';
const processor = require('gherkin-preprocessor');
const processor = require('gherkin-precompiler');

let ast = processor.load('./features/src/login.feature');
ast = processor.process(
Expand Down
4 changes: 2 additions & 2 deletions lib/PreProcessor.js → lib/PreCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const METHODS = {
* Gherkin feature file pre-processors.
* @class
*/
class PreProcessor {
class PreCompiler {
/**
* @param {Object|DefaultConfig} config
* @param config
Expand Down Expand Up @@ -280,4 +280,4 @@ class PreProcessor {
}
}

module.exports = PreProcessor;
module.exports = PreCompiler;
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ API.load = pathToFile => {
return assembler.objectToAST(document);
};

const PreProcessor = require('./PreProcessor');
const PreCompiler = require('./PreCompiler');
/**
* Applies the given pre-processors to the given AST.
*
Expand All @@ -30,7 +30,7 @@ const PreProcessor = require('./PreProcessor');
*/
API.process = (ast, ...configs) => {
configs.forEach(config => {
const processor = new PreProcessor(config);
const processor = new PreCompiler(config);
ast = processor.applyToAST(ast);
});
return ast;
Expand Down Expand Up @@ -58,7 +58,7 @@ API.save = (pathToFile, ast, options) => {

/**
* Built-in pre-processors.
* @type {Object.<String,PreProcessor>}
* @type {Object.<String,PreCompiler>}
*/
API.builtIn = {};
API.builtIn.Replacer = require('./builtIn/Replacer');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "gherkin-preprocessor",
"name": "gherkin-precompiler",
"version": "1.0.0",
"description": "Simple pre-processor for Gherkin feature files",
"main": "lib/index.js",
Expand All @@ -11,7 +11,7 @@
"preferGlobal": false,
"repository": {
"type": "git",
"url": "git+https://github.com/judit-nahaj/gherkin-preprocessor.git"
"url": "git+https://github.com/judit-nahaj/gherkin-precompiler.git"
},
"keywords": [
"gherkin",
Expand All @@ -22,13 +22,13 @@
"contributors": ["Laszlo Szikszai <sziklaszlo@gmail.com>"],
"license": "MIT",
"bugs": {
"url": "https://github.com/judit-nahaj/gherkin-preprocessor/issues"
"url": "https://github.com/judit-nahaj/gherkin-precompiler/issues"
},
"engines": {
"node": ">=4.9.2",
"npm": ">=3.0.0"
},
"homepage": "https://github.com/judit-nahaj/gherkin-preprocessor#readme",
"homepage": "https://github.com/judit-nahaj/gherkin-precompiler#readme",
"devDependencies": {
"chai": "^4.1.0",
"coveralls": "^2.13.1",
Expand Down
Empty file removed test/builtIn/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ describe('API', () => {
expect(API.process(ast)).to.equal(ast);
});

it('should copy and not modify AST if base PreProcessor provided', () => {
it('should copy and not modify AST if base PreCompiler provided', () => {
const processed = API.process(ast, new API.DefaultConfig());
expect(processed).to.not.equal(ast);
expect(processed).to.eql(ast);
});
});

describe('PreProcessor', () => {
describe('PreCompiler', () => {
describe('processing events', () => {
it('should support Feature processing', () => {
class FeatureProcessor extends API.DefaultConfig {
Expand Down

0 comments on commit 712e6f0

Please sign in to comment.