Skip to content

Commit 21ef007

Browse files
committed
New folder structure, part 2
1 parent 4bfceff commit 21ef007

20 files changed

+68
-77
lines changed

resolver/src/bin/format.ts renamed to bin/format.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import parseArgs from "minimist";
2-
import { fromStdin, fromFile } from "../../../lib/input";
3-
import { Resource as ResourceParser } from "../../../syntax/grammar";
4-
import { Resource, NodeType, GroupComment } from "../ast";
5-
import { Bundle } from "../bundle";
6-
import { ErrorKind } from "../error";
7-
import { Value, StringValue, NumberValue } from "../value";
2+
import {fromStdin, fromFile} from "../lib/input";
3+
import {Resource as ResourceParser} from "../syntax/grammar";
4+
import {Resource, NodeType, GroupComment} from "../resolver/ast";
5+
import {Bundle} from "../resolver/bundle";
6+
import {ErrorKind} from "../resolver/error";
7+
import {Value, StringValue, NumberValue} from "../resolver/value";
88

99
const argv = parseArgs(process.argv.slice(2), {
1010
boolean: ["help", "group"],
@@ -77,7 +77,7 @@ function formatResource(resource: Resource, variables: Variables) {
7777
}
7878
let message = bundle.getMessage(entry.id.name);
7979
if (message) {
80-
let { value, errors } = bundle.formatValue(message, variables);
80+
let {value, errors} = bundle.formatValue(message, variables);
8181
results.push({
8282
value,
8383
errors: errors.map(error => ({

package.json

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
{
2-
"name": "fluent-spec",
3-
"description": "Specification and documentation for Fluent",
4-
"version": "1.0.0",
5-
"private": true,
6-
"scripts": {
7-
"bench": "node -r esm --harmony-async-iteration ./test/bench.js ./test/benchmarks/gecko_strings.ftl",
8-
"build:guide": "gitbook build guide build/guide",
9-
"build": "npm run --silent build:guide",
10-
"ci": "npm run --silent lint && npm test && npm run --silent test:ebnf",
11-
"clean": "rm -rf build",
12-
"deploy": "gh-pages -d build",
13-
"generate:ebnf": "node -r esm bin/ebnf.js ./syntax/grammar.js > ./spec/fluent.ebnf",
14-
"generate:fixtures": "make -sC test/fixtures",
15-
"generate": "npm run --silent generate:ebnf && npm run --silent generate:fixtures",
16-
"lint": "prettier --check **/*.js",
17-
"pretty": "prettier --write **/*.js",
18-
"test:ebnf": "node -r esm test/ebnf.js ./syntax/grammar.js ./spec/fluent.ebnf",
19-
"test:fixtures": "node -r esm test/parser.js ./test/fixtures",
20-
"test:unit": "node -r esm test/literals.js",
21-
"test:resolver": "mocha -u tdd -r ts-node/register ./resolver/test/**/*_test.ts",
22-
"test": "npm run --silent test:fixtures && npm run --silent test:unit",
23-
"watch": "tsc --watch"
24-
},
25-
"homepage": "https://projectfluent.org",
26-
"repository": {
27-
"type": "git",
28-
"url": "git+https://github.com/projectfluent/fluent.git"
29-
},
30-
"author": "Mozilla <[email protected]>",
31-
"license": "Apache-2.0",
32-
"bugs": {
33-
"url": "https://github.com/projectfluent/fluent/issues"
34-
},
35-
"devDependencies": {
36-
"@types/minimist": "^1.2.0",
37-
"@types/mocha": "^5.2.7",
38-
"@types/node": "^12.0.4",
39-
"babylon": "^6.18.0",
40-
"cli-color": "^1.2.0",
41-
"difflib": "^0.2.4",
42-
"fluent": "^0.6.4",
43-
"fluent-syntax": "^0.7.0",
44-
"gh-pages": "^1.1.0",
45-
"gitbook-cli": "^2.3.0",
46-
"json-diff": "^0.5.2",
47-
"prettier": "^1.17.1",
48-
"mocha": "^6.1.4",
49-
"ts-node": "^8.2.0",
50-
"typescript": "^3.5.1"
51-
},
52-
"dependencies": {
53-
"esm": "^3.2.25",
54-
"minimist": "^1.2.0"
55-
}
2+
"name": "fluent-spec",
3+
"description": "Specification and documentation for Fluent",
4+
"version": "1.0.0",
5+
"private": true,
6+
"scripts": {
7+
"bench": "node -r esm --harmony-async-iteration ./test/bench.js ./test/benchmarks/gecko_strings.ftl",
8+
"build:guide": "gitbook build guide build/guide",
9+
"build": "npm run --silent build:guide",
10+
"ci": "npm run --silent lint && npm test && npm run --silent test:ebnf",
11+
"clean": "rm -rf build",
12+
"deploy": "gh-pages -d build",
13+
"generate:ebnf": "node -r esm bin/ebnf.js ./syntax/grammar.js > ./spec/fluent.ebnf",
14+
"generate:fixtures": "make -sC test/fixtures",
15+
"generate": "npm run --silent generate:ebnf && npm run --silent generate:fixtures",
16+
"lint": "prettier --check **/*.js",
17+
"pretty": "prettier --write **/*.js",
18+
"test:ebnf": "node -r esm test/ebnf.js ./syntax/grammar.js ./spec/fluent.ebnf",
19+
"test:fixtures": "node -r esm test/parser.js ./test/fixtures",
20+
"test:unit": "node -r esm test/literals.js",
21+
"test:resolver": "mocha -u tdd -r ts-node/register ./test/resolver/**/*_test.ts",
22+
"test": "npm run --silent test:fixtures && npm run --silent test:unit",
23+
"watch": "tsc --watch"
24+
},
25+
"homepage": "https://projectfluent.org",
26+
"repository": {
27+
"type": "git",
28+
"url": "git+https://github.com/projectfluent/fluent.git"
29+
},
30+
"author": "Mozilla <[email protected]>",
31+
"license": "Apache-2.0",
32+
"bugs": {
33+
"url": "https://github.com/projectfluent/fluent/issues"
34+
},
35+
"devDependencies": {
36+
"@types/minimist": "^1.2.0",
37+
"@types/mocha": "^5.2.7",
38+
"@types/node": "^12.0.4",
39+
"babylon": "^6.18.0",
40+
"cli-color": "^1.2.0",
41+
"difflib": "^0.2.4",
42+
"fluent": "^0.6.4",
43+
"fluent-syntax": "^0.7.0",
44+
"gh-pages": "^1.1.0",
45+
"gitbook-cli": "^2.3.0",
46+
"json-diff": "^0.5.2",
47+
"prettier": "^1.17.1",
48+
"mocha": "^6.1.4",
49+
"ts-node": "^8.2.0",
50+
"typescript": "^3.5.1"
51+
},
52+
"dependencies": {
53+
"esm": "^3.2.25",
54+
"minimist": "^1.2.0"
55+
}
5656
}

resolver/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

resolver/.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)