Skip to content

Commit

Permalink
Move gen/ under src/
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieantonio committed May 16, 2019
1 parent fcead2e commit 3b87457
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ typings/

# Files generated by TypeScript (see tsconfig.json)
/src/*.js
/gen/*.js
/src/gen/*.js
*.js.map
*.d.ts
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Contributing and Maintaining
----------------------------

When maintaining this package, you might notice something strange.
`index.ts` depends on `./gen/WordBreakProperty.ts`, but this file
`index.ts` depends on `./src/gen/WordBreakProperty.ts`, but this file
does not exist! It is a **generated** file, created by reading Unicode
property data files, [downloaded from Unicode's website][unicodefiles].
These data files have been compressed and committed to this repository
Expand All @@ -80,10 +80,10 @@ in `libexec/`:
└── emoji-data-12.0.0.txt.gz

**Note that `compile-word-break.js` actually creates
`./gen/WordBreakProperty.ts`!**
`./src/gen/WordBreakProperty.ts`!**


### How to generate `./gen/WordBreakProperty.ts`
### How to generate `./src/gen/WordBreakProperty.ts`

When you have _just_ cloned the repository, this file will be generated
when you run `npm install`:
Expand Down
5 changes: 3 additions & 2 deletions libexec/compile-word-break.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* For internal use only. Please keep away from children.
*
* The generated file is saved to ../gen/WordBreakProperty.ts
* The generated file is saved to ../src/gen/WordBreakProperty.ts
*/
const zlib = require('zlib');
const fs = require('fs');
Expand All @@ -23,7 +23,8 @@ const MAX_CODE_POINT = 0x10FFFF;

//////////////////////////////////// Main ////////////////////////////////////

const generatedFilename = path.join(__dirname, '..', 'gen', 'WordBreakProperty.ts');
const genDirectory = path.join(__dirname, '..', 'src', 'gen');
const generatedFilename = path.join(genDirectory, 'WordBreakProperty.ts');

// Ensure this package's major version number is in sync with the Unicode
// major version.
Expand Down
2 changes: 1 addition & 1 deletion src/findBoundaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* See: https://unicode.org/reports/tr29/#Default_Word_Boundaries
*/

import { WordBreakProperty, WORD_BREAK_PROPERTY, extendedPictographic } from '../gen/WordBreakProperty';
import { WordBreakProperty, WORD_BREAK_PROPERTY, extendedPictographic } from './gen/WordBreakProperty';

/**
* Return an array of string indicies where a word break should occur. That is,
Expand Down
File renamed without changes.

0 comments on commit 3b87457

Please sign in to comment.