Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move lib to src #95

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"node": ">=18"
},
"scripts": {
"lint": "eslint lib/*.js test/*.js index.js",
"lint": "eslint lib/*.js test/*.js",
"test-generate-mo": "msgfmt test/fixtures/latin13.po -o test/fixtures/latin13.mo & msgfmt test/fixtures/utf8.po -o test/fixtures/utf8.mo & msgfmt test/fixtures/obsolete.po -o test/fixtures/obsolete.mo",
"test": "mocha",
"preversion": "npm run lint && npm test",
"postversion": "git push && git push --tags"
},
"main": "./index.js",
"main": "./src/index.js",
"license": "MIT",
"dependencies": {
"content-type": "^1.0.5",
Expand Down
8 changes: 4 additions & 4 deletions index.js → src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as poParser from './lib/poparser.js';
import poCompiler from './lib/pocompiler.js';
import moParser from './lib/moparser.js';
import moCompiler from './lib/mocompiler.js';
import * as poParser from './poparser.js';
import poCompiler from './pocompiler.js';
import moParser from './moparser.js';
import moCompiler from './mocompiler.js';

export const po = {
parse: poParser.parse,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/mo-compiler-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as chai from 'chai';
import { promisify } from 'util';
import path from 'path';
import { mo } from '../index.js';
import { mo } from '../src/index.js';
import { readFile as fsReadFile } from 'fs';
import { fileURLToPath } from 'url';

Expand Down
2 changes: 1 addition & 1 deletion test/mo-parser-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as chai from 'chai';
import { promisify } from 'util';
import path from 'path';
import { mo } from '../index.js';
import { mo } from '../src/index.js';
import { readFile as fsReadFile } from 'fs';
import { fileURLToPath } from 'url';

Expand Down
2 changes: 1 addition & 1 deletion test/module.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { po, mo } from '../index.js';
import { po, mo } from '../src/index.js';

describe('esm module', () => {
it('should allow named imports', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/po-compiler-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { promisify } from 'util';
import path from 'path';
import { readFile as fsReadFile } from 'fs';
import * as chai from 'chai';
import { po } from '../index.js';
import { po } from '../src/index.js';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
Expand Down
2 changes: 1 addition & 1 deletion test/po-obsolete-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as chai from 'chai';
import { promisify } from 'util';
import path from 'path';
import fs from 'fs';
import * as gettextParser from '../index.js';
import * as gettextParser from '../src/index.js';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
Expand Down
2 changes: 1 addition & 1 deletion test/po-parser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as chai from 'chai';
import { promisify } from 'util';
import path from 'path';
import fs from 'fs';
import * as gettextParser from '../index.js';
import * as gettextParser from '../src/index.js';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
Expand Down
2 changes: 1 addition & 1 deletion test/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as chai from 'chai';
import { promisify } from 'util';
import path from 'path';
import { formatCharset, parseHeader, generateHeader, foldLine, parseNPluralFromHeadersSafely } from '../lib/shared.js';
import { formatCharset, parseHeader, generateHeader, foldLine, parseNPluralFromHeadersSafely } from '../src/shared.js';
import { readFile as fsReadFile } from 'fs';
import { fileURLToPath } from 'url';

Expand Down